@storm-software/cloudflare-tools 0.69.9 → 0.69.11
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/CHANGELOG.md +19 -0
- package/README.md +1 -1
- package/dist/{chunk-I3T42HZ4.js → chunk-4QVKIGEH.js} +5 -5
- package/dist/{chunk-JPKUU56U.mjs → chunk-5NQCOBLB.mjs} +1 -1
- package/dist/{chunk-MUN3IQVG.mjs → chunk-DBC7P4X5.mjs} +4 -4
- package/dist/{chunk-KAC75BBW.js → chunk-FAJOO4I6.js} +5 -5
- package/dist/{chunk-MAOGR4ZA.mjs → chunk-KIYU2U77.mjs} +5 -5
- package/dist/{chunk-ESCAEH5S.js → chunk-OLYTJT2T.js} +1 -1
- package/dist/{chunk-3SANBYBY.js → chunk-SUVYUU6A.js} +62 -62
- package/dist/{chunk-XTLKKAUD.mjs → chunk-TPY4DQD7.mjs} +2 -2
- package/dist/{chunk-ACJLPNZQ.js → chunk-VDXJ4LVM.js} +2 -2
- package/dist/{chunk-ENJZEWWP.mjs → chunk-XVWYWKVD.mjs} +1 -1
- package/dist/executors.js +4 -4
- package/dist/executors.mjs +4 -4
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +12 -12
- package/dist/index.mjs +15 -15
- package/dist/src/executors/cloudflare-publish/executor.js +2 -2
- package/dist/src/executors/cloudflare-publish/executor.mjs +2 -2
- package/dist/src/executors/r2-upload-publish/executor.js +4 -4
- package/dist/src/executors/r2-upload-publish/executor.mjs +3 -3
- package/dist/src/executors/serve/executor.js +3 -3
- package/dist/src/executors/serve/executor.mjs +2 -2
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +4 -4
- package/dist/src/generators/worker/generator.mjs +3 -3
- package/package.json +2 -2
- package/dist/chunk-AV3F7R3S.js +0 -262
- package/dist/chunk-IQCKAFLI.mjs +0 -265
- package/dist/chunk-N5B4PUK6.mjs +0 -209
- package/dist/chunk-WNKYNP5G.js +0 -209
|
@@ -228,7 +228,7 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
// ../config/src/schema.ts
|
|
231
|
-
import * as z from "zod";
|
|
231
|
+
import * as z from "zod/mini";
|
|
232
232
|
|
|
233
233
|
// ../config/src/constants.ts
|
|
234
234
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
@@ -697,7 +697,7 @@ schemaRegistry.add(ownerSchema, {
|
|
|
697
697
|
description: "The owner of the package"
|
|
698
698
|
});
|
|
699
699
|
var modeSchema = z._default(
|
|
700
|
-
z.enum(["development", "
|
|
700
|
+
z.enum(["development", "test", "production"]).check(z.trim(), z.toLowerCase()),
|
|
701
701
|
"production"
|
|
702
702
|
);
|
|
703
703
|
schemaRegistry.add(modeSchema, {
|
|
@@ -228,7 +228,7 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
// ../config/src/schema.ts
|
|
231
|
-
var
|
|
231
|
+
var _mini = require('zod/mini'); var z = _interopRequireWildcard(_mini);
|
|
232
232
|
|
|
233
233
|
// ../config/src/constants.ts
|
|
234
234
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
@@ -697,7 +697,7 @@ schemaRegistry.add(ownerSchema, {
|
|
|
697
697
|
description: "The owner of the package"
|
|
698
698
|
});
|
|
699
699
|
var modeSchema = z._default(
|
|
700
|
-
z.enum(["development", "
|
|
700
|
+
z.enum(["development", "test", "production"]).check(z.trim(), z.toLowerCase()),
|
|
701
701
|
"production"
|
|
702
702
|
);
|
|
703
703
|
schemaRegistry.add(modeSchema, {
|
package/dist/executors.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";require('./chunk-XO66D74Z.js');
|
|
2
2
|
require('./chunk-IRORGRVZ.js');
|
|
3
|
-
require('./chunk-
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-NU34IEWN.js');
|
|
3
|
+
require('./chunk-SUVYUU6A.js');
|
|
4
|
+
require('./chunk-FAJOO4I6.js');
|
|
6
5
|
require('./chunk-NCQM44P3.js');
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-NU34IEWN.js');
|
|
7
|
+
require('./chunk-VDXJ4LVM.js');
|
|
8
8
|
require('./chunk-2CDSXWFA.js');
|
|
9
9
|
require('./chunk-MCKGQKYU.js');
|
package/dist/executors.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./chunk-YSCEY447.mjs";
|
|
2
2
|
import "./chunk-NTAV5AUH.mjs";
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-PH3DHY4Q.mjs";
|
|
3
|
+
import "./chunk-XVWYWKVD.mjs";
|
|
4
|
+
import "./chunk-KIYU2U77.mjs";
|
|
6
5
|
import "./chunk-IANDAPQS.mjs";
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-PH3DHY4Q.mjs";
|
|
7
|
+
import "./chunk-TPY4DQD7.mjs";
|
|
8
8
|
import "./chunk-V44DYGWX.mjs";
|
|
9
9
|
import "./chunk-ZKRNXBH6.mjs";
|
package/dist/generators.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-ACJLPNZQ.js');
|
|
7
|
-
require('./chunk-2CDSXWFA.js');
|
|
5
|
+
var _chunk4QVKIGEHjs = require('./chunk-4QVKIGEH.js');
|
|
8
6
|
|
|
9
7
|
|
|
10
8
|
|
|
11
|
-
var
|
|
9
|
+
var _chunkOLYTJT2Tjs = require('./chunk-OLYTJT2T.js');
|
|
10
|
+
require('./chunk-VDXJ4LVM.js');
|
|
11
|
+
require('./chunk-2CDSXWFA.js');
|
|
12
12
|
require('./chunk-MCKGQKYU.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.applicationGenerator =
|
|
18
|
+
exports.applicationGenerator = _chunk4QVKIGEHjs.applicationGenerator; exports.applicationSchematic = _chunk4QVKIGEHjs.applicationSchematic; exports.initGenerator = _chunkOLYTJT2Tjs.initGenerator; exports.initSchematic = _chunkOLYTJT2Tjs.initSchematic;
|
package/dist/generators.mjs
CHANGED
|
@@ -2,13 +2,13 @@ import "./chunk-3J7KBHMJ.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
applicationGenerator,
|
|
4
4
|
applicationSchematic
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-XTLKKAUD.mjs";
|
|
7
|
-
import "./chunk-V44DYGWX.mjs";
|
|
5
|
+
} from "./chunk-DBC7P4X5.mjs";
|
|
8
6
|
import {
|
|
9
7
|
initGenerator,
|
|
10
8
|
initSchematic
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5NQCOBLB.mjs";
|
|
10
|
+
import "./chunk-TPY4DQD7.mjs";
|
|
11
|
+
import "./chunk-V44DYGWX.mjs";
|
|
12
12
|
import "./chunk-ZKRNXBH6.mjs";
|
|
13
13
|
export {
|
|
14
14
|
applicationGenerator,
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-XO66D74Z.js');
|
|
2
|
-
require('./chunk-
|
|
3
|
-
require('./chunk-KAC75BBW.js');
|
|
4
|
-
require('./chunk-3SANBYBY.js');
|
|
2
|
+
require('./chunk-DHBG5ASJ.js');
|
|
5
3
|
|
|
6
4
|
|
|
7
5
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-DHBG5ASJ.js');
|
|
10
|
-
require('./chunk-CVGPWUNP.js');
|
|
6
|
+
var _chunk4QVKIGEHjs = require('./chunk-4QVKIGEH.js');
|
|
11
7
|
|
|
12
8
|
|
|
13
9
|
|
|
14
|
-
var
|
|
10
|
+
var _chunkOLYTJT2Tjs = require('./chunk-OLYTJT2T.js');
|
|
11
|
+
require('./chunk-CVGPWUNP.js');
|
|
12
|
+
require('./chunk-IRORGRVZ.js');
|
|
13
|
+
require('./chunk-SUVYUU6A.js');
|
|
14
|
+
require('./chunk-FAJOO4I6.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('./chunk-ACJLPNZQ.js');
|
|
20
|
-
require('./chunk-2CDSXWFA.js');
|
|
18
|
+
var _chunkNCQM44P3js = require('./chunk-NCQM44P3.js');
|
|
21
19
|
|
|
22
20
|
|
|
23
21
|
|
|
24
|
-
var
|
|
22
|
+
var _chunkNU34IEWNjs = require('./chunk-NU34IEWN.js');
|
|
23
|
+
require('./chunk-VDXJ4LVM.js');
|
|
24
|
+
require('./chunk-2CDSXWFA.js');
|
|
25
25
|
require('./chunk-MCKGQKYU.js');
|
|
26
26
|
|
|
27
27
|
// src/plugins/index.ts
|
|
@@ -163,4 +163,4 @@ function createPackageJson(projectJsonPath, workspaceRoot) {
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
exports.applicationGenerator =
|
|
166
|
+
exports.applicationGenerator = _chunk4QVKIGEHjs.applicationGenerator; exports.applicationSchematic = _chunk4QVKIGEHjs.applicationSchematic; exports.createNodesV2 = createNodesV2; exports.getInternalDependencies = _chunkNCQM44P3js.getInternalDependencies; exports.initGenerator = _chunkOLYTJT2Tjs.initGenerator; exports.initSchematic = _chunkOLYTJT2Tjs.initSchematic; exports.name = name; exports.r2UploadFile = _chunkNCQM44P3js.r2UploadFile;
|
package/dist/index.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import "./chunk-YSCEY447.mjs";
|
|
2
|
-
import "./chunk-NTAV5AUH.mjs";
|
|
3
|
-
import "./chunk-MAOGR4ZA.mjs";
|
|
4
|
-
import "./chunk-ENJZEWWP.mjs";
|
|
5
|
-
import {
|
|
6
|
-
ProjectTagConstants,
|
|
7
|
-
addProjectTag
|
|
8
|
-
} from "./chunk-PH3DHY4Q.mjs";
|
|
9
2
|
import "./chunk-3J7KBHMJ.mjs";
|
|
3
|
+
import {
|
|
4
|
+
applicationGenerator,
|
|
5
|
+
applicationSchematic
|
|
6
|
+
} from "./chunk-DBC7P4X5.mjs";
|
|
7
|
+
import {
|
|
8
|
+
initGenerator,
|
|
9
|
+
initSchematic
|
|
10
|
+
} from "./chunk-5NQCOBLB.mjs";
|
|
10
11
|
import "./chunk-7Z5PILRU.mjs";
|
|
12
|
+
import "./chunk-NTAV5AUH.mjs";
|
|
13
|
+
import "./chunk-XVWYWKVD.mjs";
|
|
14
|
+
import "./chunk-KIYU2U77.mjs";
|
|
11
15
|
import {
|
|
12
16
|
getInternalDependencies,
|
|
13
17
|
r2UploadFile
|
|
14
18
|
} from "./chunk-IANDAPQS.mjs";
|
|
15
19
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
+
ProjectTagConstants,
|
|
21
|
+
addProjectTag
|
|
22
|
+
} from "./chunk-PH3DHY4Q.mjs";
|
|
23
|
+
import "./chunk-TPY4DQD7.mjs";
|
|
20
24
|
import "./chunk-V44DYGWX.mjs";
|
|
21
|
-
import {
|
|
22
|
-
initGenerator,
|
|
23
|
-
initSchematic
|
|
24
|
-
} from "./chunk-JPKUU56U.mjs";
|
|
25
25
|
import "./chunk-ZKRNXBH6.mjs";
|
|
26
26
|
|
|
27
27
|
// src/plugins/index.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
var _chunkIRORGRVZjs = require('../../../chunk-IRORGRVZ.js');
|
|
4
|
-
require('../../../chunk-
|
|
4
|
+
require('../../../chunk-SUVYUU6A.js');
|
|
5
5
|
require('../../../chunk-NU34IEWN.js');
|
|
6
|
-
require('../../../chunk-
|
|
6
|
+
require('../../../chunk-VDXJ4LVM.js');
|
|
7
7
|
require('../../../chunk-2CDSXWFA.js');
|
|
8
8
|
require('../../../chunk-MCKGQKYU.js');
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runExecutor
|
|
3
3
|
} from "../../../chunk-NTAV5AUH.mjs";
|
|
4
|
-
import "../../../chunk-
|
|
4
|
+
import "../../../chunk-XVWYWKVD.mjs";
|
|
5
5
|
import "../../../chunk-PH3DHY4Q.mjs";
|
|
6
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-TPY4DQD7.mjs";
|
|
7
7
|
import "../../../chunk-V44DYGWX.mjs";
|
|
8
8
|
import "../../../chunk-ZKRNXBH6.mjs";
|
|
9
9
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../../chunk-NU34IEWN.js');
|
|
3
|
+
var _chunkFAJOO4I6js = require('../../../chunk-FAJOO4I6.js');
|
|
5
4
|
require('../../../chunk-NCQM44P3.js');
|
|
6
|
-
require('../../../chunk-
|
|
5
|
+
require('../../../chunk-NU34IEWN.js');
|
|
6
|
+
require('../../../chunk-VDXJ4LVM.js');
|
|
7
7
|
require('../../../chunk-2CDSXWFA.js');
|
|
8
8
|
require('../../../chunk-MCKGQKYU.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.default =
|
|
11
|
+
exports.default = _chunkFAJOO4I6js.runExecutor;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runExecutor
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-PH3DHY4Q.mjs";
|
|
3
|
+
} from "../../../chunk-KIYU2U77.mjs";
|
|
5
4
|
import "../../../chunk-IANDAPQS.mjs";
|
|
6
|
-
import "../../../chunk-
|
|
5
|
+
import "../../../chunk-PH3DHY4Q.mjs";
|
|
6
|
+
import "../../../chunk-TPY4DQD7.mjs";
|
|
7
7
|
import "../../../chunk-V44DYGWX.mjs";
|
|
8
8
|
import "../../../chunk-ZKRNXBH6.mjs";
|
|
9
9
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSUVYUU6Ajs = require('../../../chunk-SUVYUU6A.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkNU34IEWNjs = require('../../../chunk-NU34IEWN.js');
|
|
7
|
-
require('../../../chunk-
|
|
7
|
+
require('../../../chunk-VDXJ4LVM.js');
|
|
8
8
|
require('../../../chunk-2CDSXWFA.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -55,7 +55,7 @@ async function* serveExecutor(options, context) {
|
|
|
55
55
|
success: true
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
var executor_default =
|
|
58
|
+
var executor_default = _chunkSUVYUU6Ajs.withRunExecutor.call(void 0,
|
|
59
59
|
"Cloudflare Serve executor",
|
|
60
60
|
serveExecutor,
|
|
61
61
|
{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withRunExecutor
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-XVWYWKVD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createCliOptions
|
|
6
6
|
} from "../../../chunk-PH3DHY4Q.mjs";
|
|
7
|
-
import "../../../chunk-
|
|
7
|
+
import "../../../chunk-TPY4DQD7.mjs";
|
|
8
8
|
import "../../../chunk-V44DYGWX.mjs";
|
|
9
9
|
import {
|
|
10
10
|
__require
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkOLYTJT2Tjs = require('../../../chunk-OLYTJT2T.js');
|
|
6
6
|
require('../../../chunk-MCKGQKYU.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.default =
|
|
11
|
+
exports.default = _chunkOLYTJT2Tjs.generator_default; exports.initGenerator = _chunkOLYTJT2Tjs.initGenerator; exports.initSchematic = _chunkOLYTJT2Tjs.initSchematic;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../../chunk-
|
|
5
|
+
var _chunk4QVKIGEHjs = require('../../../chunk-4QVKIGEH.js');
|
|
6
|
+
require('../../../chunk-OLYTJT2T.js');
|
|
7
|
+
require('../../../chunk-VDXJ4LVM.js');
|
|
7
8
|
require('../../../chunk-2CDSXWFA.js');
|
|
8
|
-
require('../../../chunk-ESCAEH5S.js');
|
|
9
9
|
require('../../../chunk-MCKGQKYU.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.applicationGenerator =
|
|
14
|
+
exports.applicationGenerator = _chunk4QVKIGEHjs.applicationGenerator; exports.applicationSchematic = _chunk4QVKIGEHjs.applicationSchematic; exports.default = _chunk4QVKIGEHjs.generator_default;
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
applicationGenerator,
|
|
3
3
|
applicationSchematic,
|
|
4
4
|
generator_default
|
|
5
|
-
} from "../../../chunk-
|
|
6
|
-
import "../../../chunk-
|
|
5
|
+
} from "../../../chunk-DBC7P4X5.mjs";
|
|
6
|
+
import "../../../chunk-5NQCOBLB.mjs";
|
|
7
|
+
import "../../../chunk-TPY4DQD7.mjs";
|
|
7
8
|
import "../../../chunk-V44DYGWX.mjs";
|
|
8
|
-
import "../../../chunk-JPKUU56U.mjs";
|
|
9
9
|
import "../../../chunk-ZKRNXBH6.mjs";
|
|
10
10
|
export {
|
|
11
11
|
applicationGenerator,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/cloudflare-tools",
|
|
3
|
-
"version": "0.69.
|
|
3
|
+
"version": "0.69.11",
|
|
4
4
|
"description": "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "github",
|
|
@@ -150,5 +150,5 @@
|
|
|
150
150
|
"publishConfig": { "access": "public" },
|
|
151
151
|
"executors": "./executors.json",
|
|
152
152
|
"generators": "./generators.json",
|
|
153
|
-
"gitHead": "
|
|
153
|
+
"gitHead": "69fc35e481abd37da0a2638a66cae265a00c7fd9"
|
|
154
154
|
}
|
package/dist/chunk-AV3F7R3S.js
DELETED
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkACJLPNZQjs = require('./chunk-ACJLPNZQ.js');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunk2CDSXWFAjs = require('./chunk-2CDSXWFA.js');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _chunkESCAEH5Sjs = require('./chunk-ESCAEH5S.js');
|
|
16
|
-
|
|
17
|
-
// src/generators/worker/generator.ts
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _devkit = require('@nx/devkit');
|
|
30
|
-
var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
|
|
31
|
-
var _node = require('@nx/node');
|
|
32
|
-
var _versions = require('@nx/node/src/utils/versions');
|
|
33
|
-
var _path = require('path');
|
|
34
|
-
|
|
35
|
-
// src/generators/worker/libs/get-account-id.ts
|
|
36
|
-
function getAccountId(accountId) {
|
|
37
|
-
return `account_id = "${accountId}"`;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// src/generators/worker/libs/vitest-imports.ts
|
|
41
|
-
var vitestImports = `import { describe, expect, it, beforeAll, afterAll } from 'vitest';`;
|
|
42
|
-
|
|
43
|
-
// src/generators/worker/libs/vitest-script.ts
|
|
44
|
-
var vitestScript = `"test": "vitest run"`;
|
|
45
|
-
|
|
46
|
-
// src/generators/worker/generator.ts
|
|
47
|
-
async function applicationGenerator(tree, schema) {
|
|
48
|
-
const stopwatch = _chunk2CDSXWFAjs.getStopwatch.call(void 0, "Storm Worker generator");
|
|
49
|
-
let config;
|
|
50
|
-
try {
|
|
51
|
-
_chunk2CDSXWFAjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
|
|
52
|
-
|
|
53
|
-
`, config);
|
|
54
|
-
const workspaceRoot = _chunkACJLPNZQjs.findWorkspaceRoot.call(void 0, );
|
|
55
|
-
_chunk2CDSXWFAjs.writeDebug.call(void 0,
|
|
56
|
-
`Loading the Storm Config from environment variables and storm.json file...
|
|
57
|
-
- workspaceRoot: ${workspaceRoot}`,
|
|
58
|
-
config
|
|
59
|
-
);
|
|
60
|
-
config = await _chunkACJLPNZQjs.getConfig.call(void 0, workspaceRoot);
|
|
61
|
-
_chunk2CDSXWFAjs.writeTrace.call(void 0,
|
|
62
|
-
`Loaded Storm config into env:
|
|
63
|
-
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
64
|
-
config
|
|
65
|
-
);
|
|
66
|
-
const options = await normalizeOptions(tree, schema, config);
|
|
67
|
-
const tasks = [];
|
|
68
|
-
tasks.push(
|
|
69
|
-
await _chunkESCAEH5Sjs.generator_default.call(void 0, tree, {
|
|
70
|
-
...options,
|
|
71
|
-
skipFormat: true
|
|
72
|
-
})
|
|
73
|
-
);
|
|
74
|
-
tasks.push(
|
|
75
|
-
await _node.applicationGenerator.call(void 0, tree, {
|
|
76
|
-
...options,
|
|
77
|
-
framework: "none",
|
|
78
|
-
skipFormat: true,
|
|
79
|
-
unitTestRunner: options.unitTestRunner == "vitest" ? "none" : options.unitTestRunner,
|
|
80
|
-
e2eTestRunner: "none",
|
|
81
|
-
name: schema.name
|
|
82
|
-
})
|
|
83
|
-
);
|
|
84
|
-
if (options.unitTestRunner === "vitest") {
|
|
85
|
-
const { vitestGenerator, createOrEditViteConfig } = _devkit.ensurePackage.call(void 0,
|
|
86
|
-
"@nx/vite",
|
|
87
|
-
_versions.nxVersion
|
|
88
|
-
);
|
|
89
|
-
const vitestTask = await vitestGenerator(tree, {
|
|
90
|
-
project: options.name,
|
|
91
|
-
uiFramework: "none",
|
|
92
|
-
coverageProvider: "v8",
|
|
93
|
-
skipFormat: true,
|
|
94
|
-
testEnvironment: "node"
|
|
95
|
-
});
|
|
96
|
-
tasks.push(vitestTask);
|
|
97
|
-
createOrEditViteConfig(
|
|
98
|
-
tree,
|
|
99
|
-
{
|
|
100
|
-
project: options.name,
|
|
101
|
-
includeLib: false,
|
|
102
|
-
includeVitest: true,
|
|
103
|
-
testEnvironment: "node"
|
|
104
|
-
},
|
|
105
|
-
true
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
addCloudflareFiles(tree, options);
|
|
109
|
-
updateTsAppConfig(tree, options);
|
|
110
|
-
addTargets(tree, options);
|
|
111
|
-
if (options.unitTestRunner === "none") {
|
|
112
|
-
removeTestFiles(tree, options);
|
|
113
|
-
}
|
|
114
|
-
if (!options.skipFormat) {
|
|
115
|
-
await _devkit.formatFiles.call(void 0, tree);
|
|
116
|
-
}
|
|
117
|
-
if (options.template === "hono") {
|
|
118
|
-
tasks.push(() => {
|
|
119
|
-
const packageJsonPath = _devkit.joinPathFragments.call(void 0,
|
|
120
|
-
_nullishCoalesce(options.directory, () => ( "")),
|
|
121
|
-
"package.json"
|
|
122
|
-
);
|
|
123
|
-
if (tree.exists(packageJsonPath)) {
|
|
124
|
-
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => ({
|
|
125
|
-
...json,
|
|
126
|
-
dependencies: {
|
|
127
|
-
hono: "4.4.0",
|
|
128
|
-
..._optionalChain([json, 'optionalAccess', _ => _.dependencies])
|
|
129
|
-
}
|
|
130
|
-
}));
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
return _devkit.runTasksInSerial.call(void 0, ...tasks);
|
|
135
|
-
} catch (error) {
|
|
136
|
-
return () => {
|
|
137
|
-
_chunk2CDSXWFAjs.writeFatal.call(void 0,
|
|
138
|
-
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
139
|
-
config
|
|
140
|
-
);
|
|
141
|
-
_chunk2CDSXWFAjs.writeError.call(void 0,
|
|
142
|
-
`An exception was thrown in the generator's process
|
|
143
|
-
- Details: ${error.message}
|
|
144
|
-
- Stacktrace: ${error.stack}`,
|
|
145
|
-
config
|
|
146
|
-
);
|
|
147
|
-
};
|
|
148
|
-
} finally {
|
|
149
|
-
stopwatch();
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function updateTsAppConfig(tree, options) {
|
|
153
|
-
_devkit.updateJson.call(void 0, tree, _path.join.call(void 0, options.appProjectRoot, "tsconfig.app.json"), (json) => {
|
|
154
|
-
json.compilerOptions = {
|
|
155
|
-
...json.compilerOptions,
|
|
156
|
-
esModuleInterop: true,
|
|
157
|
-
target: "es2021",
|
|
158
|
-
lib: ["es2021"],
|
|
159
|
-
module: "es2022",
|
|
160
|
-
moduleResolution: "node",
|
|
161
|
-
resolveJsonModule: true,
|
|
162
|
-
allowJs: true,
|
|
163
|
-
checkJs: false,
|
|
164
|
-
noEmit: true,
|
|
165
|
-
isolatedModules: true,
|
|
166
|
-
allowSyntheticDefaultImports: true,
|
|
167
|
-
forceConsistentCasingInFileNames: true,
|
|
168
|
-
strict: true,
|
|
169
|
-
skipLibCheck: true
|
|
170
|
-
};
|
|
171
|
-
json.compilerOptions.types = [
|
|
172
|
-
...json.compilerOptions.types,
|
|
173
|
-
"@cloudflare/workers-types"
|
|
174
|
-
];
|
|
175
|
-
return json;
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
function addCloudflareFiles(tree, options) {
|
|
179
|
-
tree.delete(_path.join.call(void 0, options.appProjectRoot, "src/main.ts"));
|
|
180
|
-
_devkit.generateFiles.call(void 0,
|
|
181
|
-
tree,
|
|
182
|
-
_path.join.call(void 0, __dirname, "./files/common"),
|
|
183
|
-
options.appProjectRoot,
|
|
184
|
-
{
|
|
185
|
-
...options,
|
|
186
|
-
tmpl: "",
|
|
187
|
-
name: options.name,
|
|
188
|
-
accountId: options.accountId ? getAccountId(options.accountId) : "",
|
|
189
|
-
vitestScript: options.unitTestRunner === "vitest" ? vitestScript : ""
|
|
190
|
-
}
|
|
191
|
-
);
|
|
192
|
-
if (options.template && options.template !== "none") {
|
|
193
|
-
_devkit.generateFiles.call(void 0,
|
|
194
|
-
tree,
|
|
195
|
-
_path.join.call(void 0, __dirname, `./files/${options.template}`),
|
|
196
|
-
_path.join.call(void 0, options.appProjectRoot, "src"),
|
|
197
|
-
{
|
|
198
|
-
...options,
|
|
199
|
-
tmpl: "",
|
|
200
|
-
name: options.name,
|
|
201
|
-
accountId: options.accountId ? getAccountId(options.accountId) : "",
|
|
202
|
-
vitestScript: options.unitTestRunner === "vitest" ? vitestScript : "",
|
|
203
|
-
vitestImports: options.unitTestRunner === "vitest" ? vitestImports : ""
|
|
204
|
-
}
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
function addTargets(tree, options) {
|
|
209
|
-
try {
|
|
210
|
-
const projectConfiguration = _devkit.readProjectConfiguration.call(void 0, tree, options.name);
|
|
211
|
-
projectConfiguration.targets = {
|
|
212
|
-
..._nullishCoalesce(projectConfiguration.targets, () => ( {})),
|
|
213
|
-
serve: {
|
|
214
|
-
executor: "@storm-software/cloudflare-tools:serve",
|
|
215
|
-
options: {
|
|
216
|
-
port: options.port
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
"nx-release-publish": {
|
|
220
|
-
executor: "@storm-software/cloudflare-tools:cloudflare-publish"
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
if (projectConfiguration.targets.build) {
|
|
224
|
-
delete projectConfiguration.targets.build;
|
|
225
|
-
}
|
|
226
|
-
_devkit.updateProjectConfiguration.call(void 0, tree, options.name, projectConfiguration);
|
|
227
|
-
} catch (e) {
|
|
228
|
-
console.error(e);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
function removeTestFiles(tree, options) {
|
|
232
|
-
tree.delete(_path.join.call(void 0, options.appProjectRoot, "src", "index.test.ts"));
|
|
233
|
-
}
|
|
234
|
-
async function normalizeOptions(host, options, config) {
|
|
235
|
-
const { projectName: appProjectName, projectRoot: appProjectRoot } = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, host, {
|
|
236
|
-
name: options.name,
|
|
237
|
-
projectType: "application",
|
|
238
|
-
directory: options.directory,
|
|
239
|
-
rootProject: options.rootProject
|
|
240
|
-
});
|
|
241
|
-
options.rootProject = appProjectRoot === ".";
|
|
242
|
-
return {
|
|
243
|
-
addPlugin: process.env.NX_ADD_PLUGINS !== "false",
|
|
244
|
-
accountId: process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
|
|
245
|
-
...options,
|
|
246
|
-
name: _devkit.names.call(void 0, appProjectName).fileName,
|
|
247
|
-
frontendProject: options.frontendProject ? _devkit.names.call(void 0, options.frontendProject).fileName : void 0,
|
|
248
|
-
appProjectRoot,
|
|
249
|
-
unitTestRunner: _nullishCoalesce(options.unitTestRunner, () => ( "vitest")),
|
|
250
|
-
rootProject: _nullishCoalesce(options.rootProject, () => ( false)),
|
|
251
|
-
template: _nullishCoalesce(options.template, () => ( "fetch-handler")),
|
|
252
|
-
port: _nullishCoalesce(options.port, () => ( 3e3))
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
var generator_default2 = applicationGenerator;
|
|
256
|
-
var applicationSchematic = _devkit.convertNxGenerator.call(void 0, applicationGenerator);
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
exports.applicationGenerator = applicationGenerator; exports.generator_default = generator_default2; exports.applicationSchematic = applicationSchematic;
|