@effect-app/cli 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.cjs ADDED
@@ -0,0 +1,10 @@
1
+ const makeBase = require("../../.eslintrc.base")
2
+ const base = makeBase(__dirname, true)
3
+
4
+ module.exports = {
5
+ ...base,
6
+ rules: {
7
+ ...base.rules,
8
+ "@typescript-eslint/no-empty-interface": "off"
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ **/node_modules/
2
+
3
+ **/dist/
4
+ **/*.js
5
+ **/*.jsx
6
+ **/*.d.ts
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @effect-app/cli
2
+
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Initial release
package/_cjs/index.cjs ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _child_process = _interopRequireDefault(require("child_process"));
4
+ var _fs = _interopRequireDefault(require("fs"));
5
+ var _nodeWatch = _interopRequireDefault(require("node-watch"));
6
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7
+ // monitor '../resources/dist', '../types/dist', '../ui/dist'
8
+ // and spawn the desired command
9
+
10
+ const cmds = process.argv.slice(2);
11
+ const dirs = ["../resources/dist", "../types/dist", "../ui/dist"];
12
+ const touch = path => {
13
+ const time = new Date();
14
+ try {
15
+ _fs.default.utimesSync(path, time, time);
16
+ } catch (err) {
17
+ _fs.default.closeSync(_fs.default.openSync(path, "w"));
18
+ }
19
+ };
20
+ dirs.forEach(d => {
21
+ if (_fs.default.existsSync(d)) {
22
+ _nodeWatch.default.default(d, {
23
+ recursive: true
24
+ }, () => {
25
+ // console.log("change!", d)
26
+ touch("./tsconfig.json");
27
+ });
28
+ }
29
+ });
30
+ _child_process.default.spawn(cmds[0], cmds.slice(1), {
31
+ stdio: "inherit"
32
+ });
33
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","mappings":";;AAGA;AACA;AAEA;AAA0B;AAN1B;AACA;;AAOA,MAAMA,IAAI,GAAGC,OAAO,CAACC,IAAI,CAACC,KAAK,CAAC,CAAC,CAAC;AAElC,MAAMC,IAAI,GAAG,CAAC,mBAAmB,EAAE,eAAe,EAAE,YAAY,CAAC;AAEjE,MAAMC,KAAK,GAAIC,IAAY,IAAI;EAC7B,MAAMC,IAAI,GAAG,IAAIC,IAAI,EAAE;EACvB,IAAI;IACFC,WAAE,CAACC,UAAU,CAACJ,IAAI,EAAEC,IAAI,EAAEA,IAAI,CAAC;GAChC,CAAC,OAAOI,GAAG,EAAE;IACZF,WAAE,CAACG,SAAS,CAACH,WAAE,CAACI,QAAQ,CAACP,IAAI,EAAE,GAAG,CAAC,CAAC;;AAExC,CAAC;AAEDF,IAAI,CAACU,OAAO,CAACC,CAAC,IAAG;EACf,IAAIN,WAAE,CAACO,UAAU,CAACD,CAAC,CAAC,EAAE;IACpBE,kBAAC,CAACC,OAAO,CAACH,CAAC,EAAE;MAAEI,SAAS,EAAE;IAAI,CAAE,EAAE,MAAK;MACrC;MACAd,KAAK,CAAC,iBAAiB,CAAC;IAC1B,CAAC,CAAC;;AAEN,CAAC,CAAC;AAEFe,sBAAE,CAACC,KAAK,CAACrB,IAAI,CAAC,CAAC,CAAE,EAAEA,IAAI,CAACG,KAAK,CAAC,CAAC,CAAC,EAAE;EAAEmB,KAAK,EAAE;AAAS,CAAE,CAAC","names":["cmds","process","argv","slice","dirs","touch","path","time","Date","fs","utimesSync","err","closeSync","openSync","forEach","d","existsSync","w","default","recursive","cp","spawn","stdio"],"sourceRoot":"","sources":["../_src/index.ts"],"sourcesContent":[null]}
package/_src/index.ts ADDED
@@ -0,0 +1,31 @@
1
+ // monitor '../resources/dist', '../types/dist', '../ui/dist'
2
+ // and spawn the desired command
3
+
4
+ import cp from "child_process"
5
+ import fs from "fs"
6
+
7
+ import w from "node-watch"
8
+
9
+ const cmds = process.argv.slice(2)
10
+
11
+ const dirs = ["../resources/dist", "../types/dist", "../ui/dist"]
12
+
13
+ const touch = (path: string) => {
14
+ const time = new Date()
15
+ try {
16
+ fs.utimesSync(path, time, time)
17
+ } catch (err) {
18
+ fs.closeSync(fs.openSync(path, "w"))
19
+ }
20
+ }
21
+
22
+ dirs.forEach(d => {
23
+ if (fs.existsSync(d)) {
24
+ w.default(d, { recursive: true }, () => {
25
+ // console.log("change!", d)
26
+ touch("./tsconfig.json")
27
+ })
28
+ }
29
+ })
30
+
31
+ cp.spawn(cmds[0]!, cmds.slice(1), { stdio: "inherit" })
package/bin.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "@effect-app/cli"
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../_src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ // monitor '../resources/dist', '../types/dist', '../ui/dist'
2
+ // and spawn the desired command
3
+ import cp from "child_process";
4
+ import fs from "fs";
5
+ import w from "node-watch";
6
+ const cmds = process.argv.slice(2);
7
+ const dirs = ["../resources/dist", "../types/dist", "../ui/dist"];
8
+ const touch = (path) => {
9
+ const time = new Date();
10
+ try {
11
+ fs.utimesSync(path, time, time);
12
+ }
13
+ catch (err) {
14
+ fs.closeSync(fs.openSync(path, "w"));
15
+ }
16
+ };
17
+ dirs.forEach(d => {
18
+ if (fs.existsSync(d)) {
19
+ w.default(d, { recursive: true }, () => {
20
+ // console.log("change!", d)
21
+ touch("./tsconfig.json");
22
+ });
23
+ }
24
+ });
25
+ cp.spawn(cmds[0], cmds.slice(1), { stdio: "inherit" });
26
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9fc3JjL2luZGV4L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NIO0FBQ0gsQ0FBQyxDQUFDLENBQUE7QUFFRixFQUFFLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUUsRUFBRSxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsS0FBSyxFQUFFLFNBQVMsRUFBRSxDQUFDLENBQUEifQ==
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@effect-app/cli",
3
+ "version": "0.0.2",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "bin": {
7
+ "effect-app-cli": "./bin.js"
8
+ },
9
+ "dependencies": {
10
+ "node-watch": "^0.7.3"
11
+ },
12
+ "devDependencies": {
13
+ "@babel/cli": "^7.20.7",
14
+ "@types/node": "~18.11.18",
15
+ "json5": "^2.2.3",
16
+ "ts-node": "^10.9.1",
17
+ "typescript": "https://cdn.jsdelivr.net/npm/@tsplus/installer@0.0.168/compiler/typescript.tgz",
18
+ "vitest": "^0.28.3"
19
+ },
20
+ "typesVersions": {
21
+ "*": {
22
+ "*": [
23
+ "dist/*"
24
+ ]
25
+ }
26
+ },
27
+ "exports": {
28
+ ".": {
29
+ "import": {
30
+ "types": "./dist/index.d.ts",
31
+ "default": "./dist/index.js"
32
+ },
33
+ "require": {
34
+ "types": "./dist/index.d.ts",
35
+ "default": "./_cjs/index.cjs"
36
+ }
37
+ },
38
+ "./index": {
39
+ "import": {
40
+ "types": "./dist/index.d.ts",
41
+ "default": "./dist/index.js"
42
+ },
43
+ "require": {
44
+ "types": "./dist/index.d.ts",
45
+ "default": "./_cjs/index.cjs"
46
+ }
47
+ }
48
+ },
49
+ "gitHead": "bd8e27eea3eff97db8739d577d67e7336c078d28",
50
+ "sideEffects": [
51
+ "./dist/faker.js",
52
+ "./faker",
53
+ "./src/faker",
54
+ "./dist/faker",
55
+ "./dist/src/faker.js",
56
+ "./dist/faker.js"
57
+ ],
58
+ "scripts": {
59
+ "watch": "pnpm build:tsc -w",
60
+ "build:tsc": "pnpm clean-dist && node ../../scripts/package.js && NODE_OPTIONS=--max-old-space-size=6144 tsc --build",
61
+ "build": "pnpm build:tsc && pnpm build2:cjs",
62
+ "build2:cjs": "rm -rf _cjs && babel dist --config-file ../../.babel.cjs.json --out-dir _cjs --out-file-extension .cjs --source-maps",
63
+ "watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsc -w",
64
+ "clean": "rm -rf dist && rm -rf _cjs",
65
+ "clean-dist": "sh ../../scripts/clean-dist.sh",
66
+ "circular": "pnpm circular:src && pnpm circular:dist",
67
+ "circular:src": "madge --circular --ts-config ./tsconfig.json --extensions ts ./_src",
68
+ "circular:dist": "madge --circular --extensions js ./dist",
69
+ "compile": "NODE_OPTIONS=--max-old-space-size=6144 tsc --noEmit",
70
+ "lint": "NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./_src",
71
+ "lint:watch": "ESLINT_TS=1 esw -w --changed --clear --ext ts,tsx .",
72
+ "autofix": "pnpm lint --fix",
73
+ "test": "vitest",
74
+ "test:run": "pnpm run test run --passWithNoTests",
75
+ "testsuite": "pnpm lint && pnpm circular && pnpm run test:run",
76
+ "ncu": "ncu",
77
+ "pub": "pnpm prepublish && npm publish --access public",
78
+ "prepublish": "pnpm build && cp -f ./tsconfig.json ./tsconfig.json.bak && node ../../scripts/mergeTsConfig.cjs ./tsconfig.json"
79
+ }
80
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,112 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "allowUnusedLabels": false,
5
+ "allowUnreachableCode": false,
6
+ "exactOptionalPropertyTypes": false,
7
+ "noFallthroughCasesInSwitch": true,
8
+ "noImplicitOverride": true,
9
+ "noImplicitReturns": false,
10
+ "noPropertyAccessFromIndexSignature": true,
11
+ "noUncheckedIndexedAccess": true,
12
+ "noUnusedLocals": true,
13
+ "noUnusedParameters": true,
14
+ "importsNotUsedAsValues": "error",
15
+ "checkJs": true,
16
+ "esModuleInterop": true,
17
+ "skipLibCheck": true,
18
+ "forceConsistentCasingInFileNames": true,
19
+ "module": "ESNext",
20
+ "lib": [
21
+ "esnext"
22
+ ],
23
+ "target": "es2021",
24
+ "inlineSourceMap": true,
25
+ "incremental": true,
26
+ "composite": true,
27
+ "declarationMap": true,
28
+ "experimentalDecorators": true,
29
+ "emitDecoratorMetadata": true,
30
+ "noImplicitAny": true,
31
+ "useUnknownInCatchVariables": true,
32
+ "noImplicitThis": true,
33
+ "outDir": "./dist",
34
+ "resolveJsonModule": true,
35
+ "moduleResolution": "Node16",
36
+ "downlevelIteration": true,
37
+ "noErrorTruncation": true,
38
+ "ignoreDeprecations": "5.0",
39
+ "tsPlusTypes": [
40
+ "./node_modules/@effect-app/core/vendor/effect-io-tsplus.json",
41
+ "./node_modules/@effect-app/core/vendor/effect-stm-tsplus.json",
42
+ "./node_modules/@effect-app/core/vendor/effect-stream-tsplus.json",
43
+ "./node_modules/@effect-app/core/vendor/fp-ts-core-tsplus.json",
44
+ "./node_modules/@effect-app/core/vendor/fp-ts-data-tsplus.json",
45
+ "./node_modules/@effect-app/core/vendor/fp-ts-optic-tsplus.json"
46
+ ],
47
+ "plugins": [
48
+ {
49
+ "name": "@effect/language-service",
50
+ "diagnostics": {
51
+ "1002": "none"
52
+ }
53
+ }
54
+ ],
55
+ "transformers": [
56
+ {
57
+ "name": "@effect/language-service/transformer",
58
+ "trace": {
59
+ "exclude": [
60
+ "**/*.ts"
61
+ ]
62
+ }
63
+ }
64
+ ],
65
+ "types": [
66
+ "vitest/globals"
67
+ ],
68
+ "tsPlusConfig": "./tsplus.config.json",
69
+ "rootDir": "./_src",
70
+ "tsBuildInfoFile": "./dist/.tsbuildinfo",
71
+ "noEmit": true
72
+ },
73
+ "$schema": "https://json.schemastore.org/tsconfig",
74
+ "display": "Strictest",
75
+ "watchOptions": {
76
+ "watchFile": "useFsEvents",
77
+ "watchDirectory": "useFsEvents",
78
+ "fallbackPolling": "dynamicPriority",
79
+ "excludeDirectories": [
80
+ "**/node_modules",
81
+ "**/dist",
82
+ "**/.build",
83
+ "**/.git",
84
+ "**/.data",
85
+ "**/.logs",
86
+ "**/.*"
87
+ ],
88
+ "excludeFiles": [
89
+ "**/*.tmp",
90
+ "openapi.json",
91
+ "*.json"
92
+ ]
93
+ },
94
+ "include": [
95
+ "./_src/**/*.ts"
96
+ ],
97
+ "exclude": [
98
+ "**/node_modules",
99
+ "**/build",
100
+ "**/dist",
101
+ "**/.*"
102
+ ],
103
+ "ts-node": {
104
+ "require": [
105
+ "tsconfig-paths/register"
106
+ ],
107
+ "compilerOptions": {
108
+ "module": "CommonJS"
109
+ }
110
+ },
111
+ "references": []
112
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "lib": [
5
+ "esnext"
6
+ ],
7
+ "tsPlusConfig": "../../tsplus.config.json",
8
+ "moduleResolution": "Node16",
9
+ "outDir": "./dist",
10
+ "rootDir": "./_src",
11
+ "tsBuildInfoFile": "./dist/.tsbuildinfo",
12
+ },
13
+ "include": [
14
+ "./_src/**/*.ts"
15
+ ],
16
+ "ts-node": {
17
+ "require": [
18
+ "tsconfig-paths/register"
19
+ ],
20
+ "compilerOptions": {
21
+ "module": "CommonJS"
22
+ }
23
+ },
24
+ "references": []
25
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "importMap": {
3
+ "^(.*)/packages/(.*)/_src/(.*)\\.[cm]?[tj]s$": "@effect-app/$2/$3",
4
+ "^(.*)/node_modules/@effect-app/(.*)/_src/(.*)\\.[cm]?[tj]s$": "@effect-app/$2/$3"
5
+ }
6
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="vitest" />
2
+ import { defineConfig } from "vite"
3
+ import makeConfig from "../../vite.config.base"
4
+
5
+ export default defineConfig(makeConfig(__dirname))
package/wallaby.cjs ADDED
@@ -0,0 +1 @@
1
+ module.exports = require("../../wallaby.base.cjs")