Initial commit - Dutchie dispensary scraper

This commit is contained in:
Kelly
2025-11-28 19:45:44 -07:00
commit 5757a8e9bd
23375 changed files with 3788799 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [default]
pull_request:
branches: [default]
jobs:
test:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Install
if: steps.cache-modules.outputs.cache-hit != 'true'
run: npm install
- name: Type Check
run: npm run check --if-present
- name: Test ES
if: ${{!startsWith(matrix.node-version, '10.')}}
run: npm run test:es --if-present
- name: Test CommonJS
run: npm run test:cjs --if-present
- name: Test React Native
run: npm run test:react-native --if-present
validate-types:
name: Check type use
runs-on: ubuntu-latest
strategy:
matrix:
test-package: ['ts', 'esm', 'cjs']
steps:
- uses: actions/checkout@v2
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: 12.x-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Install
if: steps.cache-modules.outputs.cache-hit != 'true'
run: npm install
- name: Test ${{ matrix.test-package }}
run: npm run test:types:${{matrix.test-package}}
publish:
name: Publish
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/default'
steps:
- uses: actions/checkout@v2
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: 12.x-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Install
if: steps.cache-modules.outputs.cache-hit != 'true'
run: npm install
- name: Test
run: npm test
- name: Publish
uses: mikeal/merge-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

37
backend/node_modules/web-encoding/Readme.md generated vendored Normal file
View File

@@ -0,0 +1,37 @@
# web-encoding
![Node.js CI][node.js ci]
[![package][version.icon] ![downloads][downloads.icon]][package.url]
[![styled with prettier][prettier.icon]][prettier.url]
This package provides [TextEncoder][] and [TextDecoder][] [Encoding Standard][]
APIs in a universal package. In the browsers it just exposes existing globals,
in nodejs it exposes globals in newer node versions and ones from `util` module
in older versions, and in the React Native environments it exposes these from
the [@zxing/text-encoding](https://www.npmjs.com/package/@zxing/text-encoding)
polyfill (installed as an optional dependency).
Package also works as ES module and CommonJS module.
### Usage
```js
import { TextEncoder, TextDecoder } from "web-encoding"
```
## Install
npm install web-encoding
[node.js ci]: https://github.com/Gozala/web-encoding/workflows/Node.js%20CI/badge.svg
[version.icon]: https://img.shields.io/npm/v/web-encoding.svg
[downloads.icon]: https://img.shields.io/npm/dm/web-encoding.svg
[package.url]: https://npmjs.org/package/web-encoding
[downloads.image]: https://img.shields.io/npm/dm/web-encoding.svg
[downloads.url]: https://npmjs.org/package/web-encoding
[prettier.icon]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg
[prettier.url]: https://github.com/prettier/prettier
[ts-jsdoc]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
[textencoder]: https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder
[textdecoder]: https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder
[encoding standard]: https://encoding.spec.whatwg.org/

62
backend/node_modules/web-encoding/package.json generated vendored Normal file
View File

@@ -0,0 +1,62 @@
{
"name": "web-encoding",
"version": "1.1.5",
"description": "TextEncoder and TextDecoder APIs from Encoding Standard APIs in a universal package",
"keywords": [
"TextEncoder",
"TextDecoder"
],
"react-native": "./src/lib.react-native.js",
"main": "./src/lib.js",
"module": "./src/lib.mjs",
"browser": "./src/lib.js",
"types": "./src/lib.d.ts",
"exports": {
".": {
"import": "./src/lib.mjs",
"require": "./src/lib.js"
}
},
"scripts": {
"test:node": "mocha test/test-*.spec.js",
"test:browser": "playwright-test test/test-*.js",
"test:react-native": "jest test/test-lib.react-native.spec.js",
"test:es": "mocha test/test-lib.spec.mjs",
"test:cjs": "npm run test:node && npm run test:browser",
"test:types:ts": "npm test --prefix test/ts-use",
"test:types:esm": "npm test --prefix test/esm-use",
"test:types:cjs": "npm test --prefix test/cjs-use",
"test:types": "npm run test:types:ts && npm run test:types:esm && npm run test:types:cjs",
"test": "npm run test:es && npm run test:cjs && npm run test:react-native && npm run test:types"
},
"license": "MIT",
"author": "Irakli Gozalishvili <dev@gozala.io>",
"homepage": "https://github.com/gozala/web-encoding",
"dependencies": {
"util": "^0.12.3"
},
"devDependencies": {
"assert": "^2.0.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"mocha": "8.3.2",
"playwright-test": "2.1.0",
"react-native": "^0.63.4"
},
"optionalDependencies": {
"@zxing/text-encoding": "0.9.0"
},
"jest": {
"preset": "react-native",
"transform": {
"\\.js$": [
"babel-jest",
{
"presets": [
"module:metro-react-native-babel-preset"
]
}
]
}
}
}

4
backend/node_modules/web-encoding/src/lib.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
declare var TextEncoder: typeof self.TextEncoder
declare var TextDecoder: typeof self.TextDecoder
export { TextEncoder, TextDecoder }

7
backend/node_modules/web-encoding/src/lib.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict"
exports.TextEncoder =
typeof TextEncoder !== "undefined" ? TextEncoder : require("util").TextEncoder
exports.TextDecoder =
typeof TextDecoder !== "undefined" ? TextDecoder : require("util").TextDecoder

7
backend/node_modules/web-encoding/src/lib.mjs generated vendored Normal file
View File

@@ -0,0 +1,7 @@
// In node `export { TextEncoder }` throws:
// "Export 'TextEncoder' is not defined in module"
// To workaround we first define constants and then export with as.
const Encoder = TextEncoder
const Decoder = TextDecoder
export { Encoder as TextEncoder, Decoder as TextDecoder }

View File

@@ -0,0 +1,5 @@
"use strict"
const textEncoding = require("@zxing/text-encoding")
exports.TextEncoder = textEncoding.TextEncoder
exports.TextDecoder = textEncoding.TextDecoder

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"name": "cjs-use",
"private": true,
"dependencies": {
"web-encoding": "file:../.."
},
"scripts": {
"test": "npm install && tsc --noEmit --allowJs --checkJs src/main.js"
},
"devDependencies": {
"typescript": "^4.2.3"
}
}

View File

@@ -0,0 +1,19 @@
// @ts-check
const { TextEncoder, TextDecoder } = require("web-encoding")
/**
* @param {string} text
* @returns {Uint8Array}
*/
const encode = (text) =>
new TextEncoder().encode(text)
/**
* @param {Uint8Array} bytes
* @returns {string}
*/
const decode = (bytes) =>
new TextDecoder().decode(bytes)
module.exports = { encode, decode }

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"name": "esm-use",
"private": true,
"dependencies": {
"web-encoding": "file:../.."
},
"scripts": {
"test": "npm install && tsc --noEmit --allowJs --checkJs src/main.js"
},
"devDependencies": {
"typescript": "^4.2.3"
}
}

View File

@@ -0,0 +1,17 @@
// @ts-check
import { TextEncoder, TextDecoder } from "web-encoding"
/**
* @param {string} text
* @returns {Uint8Array}
*/
export const encode = (text) =>
new TextEncoder().encode(text)
/**
* @param {Uint8Array} bytes
* @returns {string}
*/
export const decode = (bytes) =>
new TextDecoder().decode(bytes)

View File

@@ -0,0 +1,28 @@
const { TextEncoder, TextDecoder } = require("../src/lib.react-native.js")
const assert = require("assert")
describe("text encode/decode", () => {
const data = Uint8Array.from([
104,
101,
108,
108,
111,
32,
119,
111,
114,
108,
100,
])
it("can encode text", () => {
const bytes = new TextEncoder().encode("hello world")
assert.deepStrictEqual(bytes, data)
})
it("can decode text", () => {
const text = new TextDecoder().decode(data)
assert.equal(text, "hello world")
})
})

View File

@@ -0,0 +1,28 @@
const { TextEncoder, TextDecoder } = require("../src/lib")
const assert = require("assert")
describe("text encode/decode", () => {
const data = Uint8Array.from([
104,
101,
108,
108,
111,
32,
119,
111,
114,
108,
100,
])
it("can encode text", () => {
const bytes = new TextEncoder().encode("hello world")
assert.deepStrictEqual(bytes, data)
})
it("can decode text", () => {
const text = new TextDecoder().decode(data)
assert.equal(text, "hello world")
})
})

View File

@@ -0,0 +1,28 @@
import { TextEncoder, TextDecoder } from "../src/lib.js"
import assert from "assert"
describe("text encode/decode", () => {
const data = Uint8Array.from([
104,
101,
108,
108,
111,
32,
119,
111,
114,
108,
100,
])
it("can encode text", () => {
const bytes = new TextEncoder().encode("hello world")
assert.deepStrictEqual(bytes, data)
})
it("can decode text", () => {
const text = new TextDecoder().decode(data)
assert.equal(text, "hello world")
})
})

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"name": "ts-use",
"private": true,
"dependencies": {
"web-encoding": "file:../.."
},
"scripts": {
"test": "npm install && tsc --noEmit"
},
"devDependencies": {
"typescript": "^4.2.3"
}
}

View File

@@ -0,0 +1,7 @@
import { TextEncoder, TextDecoder } from "web-encoding"
export const encode = (text:string):Uint8Array =>
new TextEncoder().encode(text)
export const decode = (bytes:Uint8Array):string =>
new TextDecoder().decode(bytes)

View File

@@ -0,0 +1,10 @@
{
"compilerOptions": {
"noImplicitAny": true,
"strict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"strictBindCallApply": true
}
}