@storm-software/cloudflare-tools 0.71.210 → 0.71.212

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/README.md +7 -7
  3. package/dist/{chunk-MZFOPOSA.mjs → chunk-3Z2F7VN4.mjs} +1 -1
  4. package/dist/{chunk-2UW4WAHW.js → chunk-6KDWHW2G.js} +29 -1
  5. package/dist/{chunk-37JKGWKW.mjs → chunk-6Z2WUPYH.mjs} +4 -4
  6. package/dist/{chunk-F5RW4AZL.mjs → chunk-CSTZEHUP.mjs} +2 -73
  7. package/dist/chunk-E52DON6Y.mjs +132 -0
  8. package/dist/{chunk-75CHHXTR.js → chunk-E5RARE7E.js} +2 -2
  9. package/dist/chunk-E7ITICBK.js +77 -0
  10. package/dist/chunk-FBLD25X4.js +93 -0
  11. package/dist/{chunk-O7L7SGHE.js → chunk-KUGKM6MY.js} +5 -5
  12. package/dist/{chunk-LBHXS7RE.js → chunk-O327KKPU.js} +2 -2
  13. package/dist/{chunk-FEGLXQK4.mjs → chunk-OL24QIXM.mjs} +1 -1
  14. package/dist/chunk-T6GKRQUF.mjs +77 -0
  15. package/dist/{chunk-TNVZ6KHS.mjs → chunk-U6OMVOFA.mjs} +1 -1
  16. package/dist/{chunk-5KJIDUNK.mjs → chunk-UUTVNCRX.mjs} +29 -1
  17. package/dist/chunk-VJLWHQ5B.js +132 -0
  18. package/dist/{chunk-U7XMCD6Y.js → chunk-XB6S7S3C.js} +3 -3
  19. package/dist/executors.js +5 -4
  20. package/dist/executors.mjs +5 -4
  21. package/dist/generators.js +3 -3
  22. package/dist/generators.mjs +2 -2
  23. package/dist/index.d.mts +2 -6
  24. package/dist/index.d.ts +2 -6
  25. package/dist/index.js +23 -144
  26. package/dist/index.mjs +11 -132
  27. package/dist/src/executors/cloudflare-publish/executor.js +5 -4
  28. package/dist/src/executors/cloudflare-publish/executor.mjs +4 -3
  29. package/dist/src/executors/r2-upload-publish/executor.js +4 -3
  30. package/dist/src/executors/r2-upload-publish/executor.mjs +3 -2
  31. package/dist/src/executors/r2-upload-publish/untyped.d.mts +5 -0
  32. package/dist/src/executors/r2-upload-publish/untyped.d.ts +5 -0
  33. package/dist/src/executors/r2-upload-publish/untyped.js +86 -0
  34. package/dist/src/executors/r2-upload-publish/untyped.mjs +86 -0
  35. package/dist/src/executors/serve/executor.js +5 -4
  36. package/dist/src/executors/serve/executor.mjs +3 -2
  37. package/dist/src/generators/init/generator.js +2 -2
  38. package/dist/src/generators/init/generator.mjs +1 -1
  39. package/dist/src/generators/worker/generator.js +3 -3
  40. package/dist/src/generators/worker/generator.mjs +2 -2
  41. package/dist/src/plugins/index.d.mts +6 -0
  42. package/dist/src/plugins/index.d.ts +6 -0
  43. package/dist/src/plugins/index.js +10 -0
  44. package/dist/src/plugins/index.mjs +10 -0
  45. package/package.json +33 -5
  46. package/dist/chunk-XKQ3HGET.js +0 -164
  47. package/dist/tsup.config.d.mts +0 -5
  48. package/dist/tsup.config.d.ts +0 -5
  49. package/dist/tsup.config.js +0 -31
  50. package/dist/tsup.config.mjs +0 -31
@@ -0,0 +1,77 @@
1
+ import {
2
+ ProjectTagConstants,
3
+ isEqualProjectTag
4
+ } from "./chunk-CSTZEHUP.mjs";
5
+
6
+ // ../workspace-tools/src/utils/package-helpers.ts
7
+ import {
8
+ joinPathFragments,
9
+ readJsonFile
10
+ } from "@nx/devkit";
11
+
12
+ // ../config-tools/src/utilities/toml.ts
13
+ import TOML from "@ltd/j-toml";
14
+ function parseCargoToml(cargoString) {
15
+ if (!cargoString) {
16
+ throw new Error("Cargo.toml is empty");
17
+ }
18
+ return TOML.parse(cargoString, {
19
+ x: { comment: true }
20
+ });
21
+ }
22
+
23
+ // ../workspace-tools/src/utils/package-helpers.ts
24
+ import { execFileSync } from "child_process";
25
+ import { existsSync } from "node:fs";
26
+ import { readFile, writeFile } from "node:fs/promises";
27
+ import { dirname, resolve } from "path";
28
+ import { format } from "prettier";
29
+ var getPackageInfo = (project) => {
30
+ if (isEqualProjectTag(
31
+ project,
32
+ ProjectTagConstants.Language.TAG_ID,
33
+ ProjectTagConstants.Language.RUST
34
+ ) && existsSync(joinPathFragments(project.root, "Cargo.toml"))) {
35
+ return {
36
+ type: "Cargo.toml",
37
+ content: parseCargoToml(joinPathFragments(project.root, "Cargo.toml"))
38
+ };
39
+ } else if (isEqualProjectTag(
40
+ project,
41
+ ProjectTagConstants.Language.TAG_ID,
42
+ ProjectTagConstants.Language.TYPESCRIPT
43
+ ) && existsSync(joinPathFragments(project.root, "package.json"))) {
44
+ return {
45
+ type: "package.json",
46
+ content: readJsonFile(
47
+ joinPathFragments(project.root, "package.json")
48
+ )
49
+ };
50
+ }
51
+ return null;
52
+ };
53
+
54
+ // ../workspace-tools/src/utils/create-cli-options.ts
55
+ import { names } from "@nx/devkit";
56
+ function createCliOptions(obj) {
57
+ const args = [];
58
+ for (const key in obj) {
59
+ const value = obj[key];
60
+ if (value) {
61
+ const arg = names(key).fileName;
62
+ if (Array.isArray(value)) {
63
+ args.push(
64
+ `--${arg.toLowerCase()}=${value.map((v) => v.trim()).join(",")}`
65
+ );
66
+ } else {
67
+ args.push(`--${arg.toLowerCase()}=${value}`);
68
+ }
69
+ }
70
+ }
71
+ return args;
72
+ }
73
+
74
+ export {
75
+ getPackageInfo,
76
+ createCliOptions
77
+ };
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  createCliOptions,
11
11
  getPackageInfo
12
- } from "./chunk-F5RW4AZL.mjs";
12
+ } from "./chunk-T6GKRQUF.mjs";
13
13
  import {
14
14
  findWorkspaceRoot,
15
15
  getConfig
@@ -7,7 +7,7 @@ var require_package = __commonJS({
7
7
  "package.json"(exports, module) {
8
8
  module.exports = {
9
9
  name: "@storm-software/cloudflare-tools",
10
- version: "0.71.209",
10
+ version: "0.71.211",
11
11
  private: false,
12
12
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
13
13
  keywords: [
@@ -82,6 +82,20 @@ var require_package = __commonJS({
82
82
  default: "./dist/executors.js"
83
83
  }
84
84
  },
85
+ "./executors/*": {
86
+ import: {
87
+ types: "./dist/src/executors/*.d.mts",
88
+ default: "./dist/src/executors/*.mjs"
89
+ },
90
+ require: {
91
+ types: "./dist/src/executors/*.d.ts",
92
+ default: "./dist/src/executors/*.js"
93
+ },
94
+ default: {
95
+ types: "./dist/src/executors/*.d.ts",
96
+ default: "./dist/src/executors/*.js"
97
+ }
98
+ },
85
99
  "./generators": {
86
100
  import: {
87
101
  types: "./dist/generators.d.mts",
@@ -96,6 +110,20 @@ var require_package = __commonJS({
96
110
  default: "./dist/generators.js"
97
111
  }
98
112
  },
113
+ "./generators/*": {
114
+ import: {
115
+ types: "./dist/src/generators/*.d.mts",
116
+ default: "./dist/src/generators/*.mjs"
117
+ },
118
+ require: {
119
+ types: "./dist/src/generators/*.d.ts",
120
+ default: "./dist/src/generators/*.js"
121
+ },
122
+ default: {
123
+ types: "./dist/src/generators/*.d.ts",
124
+ default: "./dist/src/generators/*.js"
125
+ }
126
+ },
99
127
  "./utils": {
100
128
  import: {
101
129
  types: "./dist/src/utils/index.d.mts",
@@ -0,0 +1,132 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+
3
+
4
+ var _chunkFBLD25X4js = require('./chunk-FBLD25X4.js');
5
+
6
+ // src/plugins/index.ts
7
+
8
+
9
+ var _devkit = require('@nx/devkit');
10
+ var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
11
+ var _fs = require('fs');
12
+ var _path = require('path');
13
+ var _fileutils = require('nx/src/utils/fileutils');
14
+ var name = "storm-software/cloudflare-tools/cloudflare";
15
+ var createNodesV2 = [
16
+ "{**/wrangler.toml}",
17
+ async (configFiles, options = { includeApps: true }, context) => {
18
+ return await _devkit.createNodesFromFiles.call(void 0,
19
+ async (file, options2, context2) => {
20
+ try {
21
+ const packageJson = createPackageJson(file, context2.workspaceRoot);
22
+ if (!packageJson) {
23
+ return {};
24
+ }
25
+ const project = createProjectFromPackageJsonNextToProjectJson(
26
+ file,
27
+ packageJson
28
+ );
29
+ const targets = {};
30
+ targets["serve"] = {
31
+ cache: false,
32
+ inputs: ["typescript", "^production"],
33
+ dependsOn: ["build"],
34
+ executor: "@storm-software/cloudflare-tools:serve",
35
+ options: {
36
+ port: 4500
37
+ }
38
+ };
39
+ targets["clean-package"] = {
40
+ cache: true,
41
+ dependsOn: ["build"],
42
+ inputs: ["typescript", "^production"],
43
+ outputs: ["{workspaceRoot}/dist/{projectRoot}"],
44
+ executor: "@storm-software/workspace-tools:clean-package",
45
+ options: {
46
+ cleanReadMe: true,
47
+ cleanComments: true
48
+ }
49
+ };
50
+ targets["nx-release-publish"] = {
51
+ cache: false,
52
+ inputs: ["typescript", "^production"],
53
+ dependsOn: ["clean-package", "^nx-release-publish"],
54
+ executor: "@storm-software/cloudflare-tools:cloudflare-publish",
55
+ options: {}
56
+ };
57
+ _chunkFBLD25X4js.addProjectTag.call(void 0,
58
+ project,
59
+ _chunkFBLD25X4js.ProjectTagConstants.ProjectType.TAG_ID,
60
+ project.projectType === "application" ? _chunkFBLD25X4js.ProjectTagConstants.ProjectType.APPLICATION : _chunkFBLD25X4js.ProjectTagConstants.ProjectType.LIBRARY,
61
+ { overwrite: true }
62
+ );
63
+ _chunkFBLD25X4js.addProjectTag.call(void 0,
64
+ project,
65
+ _chunkFBLD25X4js.ProjectTagConstants.DistStyle.TAG_ID,
66
+ _chunkFBLD25X4js.ProjectTagConstants.DistStyle.CLEAN,
67
+ { overwrite: true }
68
+ );
69
+ _chunkFBLD25X4js.addProjectTag.call(void 0,
70
+ project,
71
+ _chunkFBLD25X4js.ProjectTagConstants.Provider.TAG_ID,
72
+ "cloudflare",
73
+ {
74
+ overwrite: true
75
+ }
76
+ );
77
+ const projects = {};
78
+ const externalNodes = {};
79
+ projects[project.root] = _defu2.default.call(void 0,
80
+ {
81
+ targets,
82
+ release: {
83
+ version: {
84
+ versionActions: "@storm-software/workspace-tools/release/js-release-actions"
85
+ }
86
+ }
87
+ },
88
+ project
89
+ );
90
+ return {
91
+ projects,
92
+ externalNodes
93
+ };
94
+ } catch (e) {
95
+ console.error(e);
96
+ return {};
97
+ }
98
+ },
99
+ configFiles,
100
+ options,
101
+ context
102
+ );
103
+ }
104
+ ];
105
+ function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, packageJson) {
106
+ const { nx, name: name2 } = packageJson;
107
+ const root = _path.dirname.call(void 0, projectJsonPath);
108
+ return {
109
+ ...nx,
110
+ name: name2,
111
+ root,
112
+ targets: {}
113
+ };
114
+ }
115
+ function createPackageJson(projectJsonPath, workspaceRoot) {
116
+ try {
117
+ const root = _path.dirname.call(void 0, projectJsonPath);
118
+ const packageJsonPath = _path.join.call(void 0, workspaceRoot, root, "package.json");
119
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
120
+ return null;
121
+ }
122
+ return _fileutils.readJsonFile.call(void 0, packageJsonPath);
123
+ } catch (e) {
124
+ console.log(e);
125
+ return null;
126
+ }
127
+ }
128
+
129
+
130
+
131
+
132
+ exports.name = name; exports.createNodesV2 = createNodesV2;
@@ -9,7 +9,7 @@ var _chunkCLCKX6UNjs = require('./chunk-CLCKX6UN.js');
9
9
 
10
10
 
11
11
 
12
- var _chunkXKQ3HGETjs = require('./chunk-XKQ3HGET.js');
12
+ var _chunkE7ITICBKjs = require('./chunk-E7ITICBK.js');
13
13
 
14
14
 
15
15
 
@@ -56,7 +56,7 @@ async function runExecutor(options, context) {
56
56
  const workspaceRoot = _chunkPGTHXO6Mjs.findWorkspaceRoot.call(void 0, );
57
57
  const config = await _chunkPGTHXO6Mjs.getConfig.call(void 0, workspaceRoot);
58
58
  const projectName = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.name]), () => ( context.projectName));
59
- const projectDetails = _chunkXKQ3HGETjs.getPackageInfo.call(void 0,
59
+ const projectDetails = _chunkE7ITICBKjs.getPackageInfo.call(void 0,
60
60
  context.projectsConfigurations.projects[context.projectName]
61
61
  );
62
62
  const bucketId = options.bucketId;
@@ -64,7 +64,7 @@ async function runExecutor(options, context) {
64
64
  if (!bucketId) {
65
65
  throw new Error("The executor requires a bucketId.");
66
66
  }
67
- const args = _chunkXKQ3HGETjs.createCliOptions.call(void 0, { ...options });
67
+ const args = _chunkE7ITICBKjs.createCliOptions.call(void 0, { ...options });
68
68
  if (isDryRun) {
69
69
  args.push("--dry-run");
70
70
  }
package/dist/executors.js CHANGED
@@ -1,10 +1,11 @@
1
1
  "use strict";require('./chunk-XO66D74Z.js');
2
- require('./chunk-U7XMCD6Y.js');
2
+ require('./chunk-XB6S7S3C.js');
3
3
  require('./chunk-KUGEZPUO.js');
4
4
  require('./chunk-CLCKX6UN.js');
5
- require('./chunk-LBHXS7RE.js');
6
- require('./chunk-O7L7SGHE.js');
7
- require('./chunk-XKQ3HGET.js');
5
+ require('./chunk-O327KKPU.js');
6
+ require('./chunk-KUGKM6MY.js');
7
+ require('./chunk-E7ITICBK.js');
8
8
  require('./chunk-PGTHXO6M.js');
9
+ require('./chunk-FBLD25X4.js');
9
10
  require('./chunk-AWKQRM2H.js');
10
11
  require('./chunk-MCKGQKYU.js');
@@ -1,10 +1,11 @@
1
1
  import "./chunk-YSCEY447.mjs";
2
- import "./chunk-TNVZ6KHS.mjs";
2
+ import "./chunk-U6OMVOFA.mjs";
3
3
  import "./chunk-SWYYMID7.mjs";
4
4
  import "./chunk-BY7MA3SM.mjs";
5
- import "./chunk-FEGLXQK4.mjs";
6
- import "./chunk-37JKGWKW.mjs";
7
- import "./chunk-F5RW4AZL.mjs";
5
+ import "./chunk-OL24QIXM.mjs";
6
+ import "./chunk-6Z2WUPYH.mjs";
7
+ import "./chunk-T6GKRQUF.mjs";
8
8
  import "./chunk-5MAMLVMV.mjs";
9
+ import "./chunk-CSTZEHUP.mjs";
9
10
  import "./chunk-K4H5ZMYA.mjs";
10
11
  import "./chunk-5RBVGYWH.mjs";
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk75CHHXTRjs = require('./chunk-75CHHXTR.js');
5
+ var _chunkE5RARE7Ejs = require('./chunk-E5RARE7E.js');
6
6
 
7
7
 
8
8
 
9
- var _chunk2UW4WAHWjs = require('./chunk-2UW4WAHW.js');
9
+ var _chunk6KDWHW2Gjs = require('./chunk-6KDWHW2G.js');
10
10
  require('./chunk-PGTHXO6M.js');
11
11
  require('./chunk-AWKQRM2H.js');
12
12
  require('./chunk-MCKGQKYU.js');
@@ -15,4 +15,4 @@ require('./chunk-MCKGQKYU.js');
15
15
 
16
16
 
17
17
 
18
- exports.applicationGenerator = _chunk75CHHXTRjs.applicationGenerator; exports.applicationSchematic = _chunk75CHHXTRjs.applicationSchematic; exports.initGenerator = _chunk2UW4WAHWjs.initGenerator; exports.initSchematic = _chunk2UW4WAHWjs.initSchematic;
18
+ exports.applicationGenerator = _chunkE5RARE7Ejs.applicationGenerator; exports.applicationSchematic = _chunkE5RARE7Ejs.applicationSchematic; exports.initGenerator = _chunk6KDWHW2Gjs.initGenerator; exports.initSchematic = _chunk6KDWHW2Gjs.initSchematic;
@@ -2,11 +2,11 @@ import "./chunk-3J7KBHMJ.mjs";
2
2
  import {
3
3
  applicationGenerator,
4
4
  applicationSchematic
5
- } from "./chunk-MZFOPOSA.mjs";
5
+ } from "./chunk-3Z2F7VN4.mjs";
6
6
  import {
7
7
  initGenerator,
8
8
  initSchematic
9
- } from "./chunk-5KJIDUNK.mjs";
9
+ } from "./chunk-UUTVNCRX.mjs";
10
10
  import "./chunk-5MAMLVMV.mjs";
11
11
  import "./chunk-K4H5ZMYA.mjs";
12
12
  import "./chunk-5RBVGYWH.mjs";
package/dist/index.d.mts CHANGED
@@ -2,12 +2,8 @@ export { C as CloudflarePublishExecutorSchema } from './schema.d-DgA16PUG.mjs';
2
2
  export { R as R2UploadPublishExecutorSchema } from './schema.d-Dcq3Apw7.mjs';
3
3
  export { I as InitGeneratorSchema, i as initGenerator, a as initSchematic } from './generator-DJ1RuHyR.mjs';
4
4
  export { W as WorkerGeneratorSchema, a as applicationGenerator, b as applicationSchematic } from './generator-DW-9W9Fk.mjs';
5
- import { CreateNodesV2 } from '@nx/devkit';
5
+ export { createNodesV2, name } from './src/plugins/index.mjs';
6
6
  export { getEncoding, getInternalDependencies, isTextFile, uploadFile } from './src/utils/r2-bucket-helpers.mjs';
7
+ import '@nx/devkit';
7
8
  import '@storm-software/workspace-tools';
8
9
  import '@aws-sdk/client-s3';
9
-
10
- declare const name = "storm-software/cloudflare-tools/cloudflare";
11
- declare const createNodesV2: CreateNodesV2;
12
-
13
- export { createNodesV2, name };
package/dist/index.d.ts CHANGED
@@ -2,12 +2,8 @@ export { C as CloudflarePublishExecutorSchema } from './schema.d-DgA16PUG.js';
2
2
  export { R as R2UploadPublishExecutorSchema } from './schema.d-Dcq3Apw7.js';
3
3
  export { I as InitGeneratorSchema, i as initGenerator, a as initSchematic } from './generator-DJ1RuHyR.js';
4
4
  export { W as WorkerGeneratorSchema, a as applicationGenerator, b as applicationSchematic } from './generator-DW-9W9Fk.js';
5
- import { CreateNodesV2 } from '@nx/devkit';
5
+ export { createNodesV2, name } from './src/plugins/index.js';
6
6
  export { getEncoding, getInternalDependencies, isTextFile, uploadFile } from './src/utils/r2-bucket-helpers.js';
7
+ import '@nx/devkit';
7
8
  import '@storm-software/workspace-tools';
8
9
  import '@aws-sdk/client-s3';
9
-
10
- declare const name = "storm-software/cloudflare-tools/cloudflare";
11
- declare const createNodesV2: CreateNodesV2;
12
-
13
- export { createNodesV2, name };
package/dist/index.js CHANGED
@@ -1,163 +1,42 @@
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-U7XMCD6Y.js');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-XO66D74Z.js');
2
+ require('./chunk-XB6S7S3C.js');
3
3
  require('./chunk-DHBG5ASJ.js');
4
4
 
5
5
 
6
6
 
7
- var _chunk75CHHXTRjs = require('./chunk-75CHHXTR.js');
7
+ var _chunkE5RARE7Ejs = require('./chunk-E5RARE7E.js');
8
8
 
9
9
 
10
10
 
11
- var _chunk2UW4WAHWjs = require('./chunk-2UW4WAHW.js');
12
- require('./chunk-KUGEZPUO.js');
13
- require('./chunk-CVGPWUNP.js');
11
+ var _chunk6KDWHW2Gjs = require('./chunk-6KDWHW2G.js');
14
12
 
15
13
 
16
14
 
15
+ var _chunkVJLWHQ5Bjs = require('./chunk-VJLWHQ5B.js');
16
+ require('./chunk-KUGEZPUO.js');
17
+ require('./chunk-CVGPWUNP.js');
17
18
 
18
19
 
19
- var _chunkCLCKX6UNjs = require('./chunk-CLCKX6UN.js');
20
- require('./chunk-LBHXS7RE.js');
21
- require('./chunk-O7L7SGHE.js');
22
20
 
23
21
 
24
22
 
25
- var _chunkXKQ3HGETjs = require('./chunk-XKQ3HGET.js');
23
+ var _chunkCLCKX6UNjs = require('./chunk-CLCKX6UN.js');
24
+ require('./chunk-O327KKPU.js');
25
+ require('./chunk-KUGKM6MY.js');
26
+ require('./chunk-E7ITICBK.js');
26
27
  require('./chunk-PGTHXO6M.js');
28
+ require('./chunk-FBLD25X4.js');
27
29
  require('./chunk-AWKQRM2H.js');
28
30
  require('./chunk-MCKGQKYU.js');
29
31
 
30
- // src/plugins/index.ts
31
-
32
-
33
- var _devkit = require('@nx/devkit');
34
- var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
35
- var _fs = require('fs');
36
- var _path = require('path');
37
- var _fileutils = require('nx/src/utils/fileutils');
38
- var name = "storm-software/cloudflare-tools/cloudflare";
39
- var createNodesV2 = [
40
- "{**/wrangler.toml}",
41
- async (configFiles, options = { includeApps: true }, context) => {
42
- return await _devkit.createNodesFromFiles.call(void 0,
43
- async (file, options2, context2) => {
44
- try {
45
- const packageJson = createPackageJson(file, context2.workspaceRoot);
46
- if (!packageJson) {
47
- return {};
48
- }
49
- const project = createProjectFromPackageJsonNextToProjectJson(
50
- file,
51
- packageJson
52
- );
53
- const targets = {};
54
- targets["serve"] = {
55
- cache: false,
56
- inputs: ["typescript", "^production"],
57
- dependsOn: ["build"],
58
- executor: "@storm-software/cloudflare-tools:serve",
59
- options: {
60
- port: 4500
61
- }
62
- };
63
- targets["clean-package"] = {
64
- cache: true,
65
- dependsOn: ["build"],
66
- inputs: ["typescript", "^production"],
67
- outputs: ["{workspaceRoot}/dist/{projectRoot}"],
68
- executor: "@storm-software/workspace-tools:clean-package",
69
- options: {
70
- cleanReadMe: true,
71
- cleanComments: true
72
- }
73
- };
74
- targets["nx-release-publish"] = {
75
- cache: false,
76
- inputs: ["typescript", "^production"],
77
- dependsOn: ["clean-package", "^nx-release-publish"],
78
- executor: "@storm-software/cloudflare-tools:cloudflare-publish",
79
- options: {}
80
- };
81
- _chunkXKQ3HGETjs.addProjectTag.call(void 0,
82
- project,
83
- _chunkXKQ3HGETjs.ProjectTagConstants.ProjectType.TAG_ID,
84
- project.projectType === "application" ? _chunkXKQ3HGETjs.ProjectTagConstants.ProjectType.APPLICATION : _chunkXKQ3HGETjs.ProjectTagConstants.ProjectType.LIBRARY,
85
- { overwrite: true }
86
- );
87
- _chunkXKQ3HGETjs.addProjectTag.call(void 0,
88
- project,
89
- _chunkXKQ3HGETjs.ProjectTagConstants.DistStyle.TAG_ID,
90
- _chunkXKQ3HGETjs.ProjectTagConstants.DistStyle.CLEAN,
91
- { overwrite: true }
92
- );
93
- _chunkXKQ3HGETjs.addProjectTag.call(void 0,
94
- project,
95
- _chunkXKQ3HGETjs.ProjectTagConstants.Provider.TAG_ID,
96
- "cloudflare",
97
- {
98
- overwrite: true
99
- }
100
- );
101
- const projects = {};
102
- const externalNodes = {};
103
- projects[project.root] = _defu2.default.call(void 0,
104
- {
105
- targets,
106
- release: {
107
- version: {
108
- versionActions: "@storm-software/workspace-tools/release/js-release-actions"
109
- }
110
- }
111
- },
112
- project
113
- );
114
- return {
115
- projects,
116
- externalNodes
117
- };
118
- } catch (e) {
119
- console.error(e);
120
- return {};
121
- }
122
- },
123
- configFiles,
124
- options,
125
- context
126
- );
127
- }
128
- ];
129
- function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, packageJson) {
130
- const { nx, name: name2 } = packageJson;
131
- const root = _path.dirname.call(void 0, projectJsonPath);
132
- return {
133
- ...nx,
134
- name: name2,
135
- root,
136
- targets: {}
137
- };
138
- }
139
- function createPackageJson(projectJsonPath, workspaceRoot) {
140
- try {
141
- const root = _path.dirname.call(void 0, projectJsonPath);
142
- const packageJsonPath = _path.join.call(void 0, workspaceRoot, root, "package.json");
143
- if (!_fs.existsSync.call(void 0, packageJsonPath)) {
144
- return null;
145
- }
146
- return _fileutils.readJsonFile.call(void 0, packageJsonPath);
147
- } catch (e) {
148
- console.log(e);
149
- return null;
150
- }
151
- }
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
- exports.applicationGenerator = _chunk75CHHXTRjs.applicationGenerator; exports.applicationSchematic = _chunk75CHHXTRjs.applicationSchematic; exports.createNodesV2 = createNodesV2; exports.getEncoding = _chunkCLCKX6UNjs.getEncoding; exports.getInternalDependencies = _chunkCLCKX6UNjs.getInternalDependencies; exports.initGenerator = _chunk2UW4WAHWjs.initGenerator; exports.initSchematic = _chunk2UW4WAHWjs.initSchematic; exports.isTextFile = _chunkCLCKX6UNjs.isTextFile; exports.name = name; exports.uploadFile = _chunkCLCKX6UNjs.uploadFile;
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+ exports.applicationGenerator = _chunkE5RARE7Ejs.applicationGenerator; exports.applicationSchematic = _chunkE5RARE7Ejs.applicationSchematic; exports.createNodesV2 = _chunkVJLWHQ5Bjs.createNodesV2; exports.getEncoding = _chunkCLCKX6UNjs.getEncoding; exports.getInternalDependencies = _chunkCLCKX6UNjs.getInternalDependencies; exports.initGenerator = _chunk6KDWHW2Gjs.initGenerator; exports.initSchematic = _chunk6KDWHW2Gjs.initSchematic; exports.isTextFile = _chunkCLCKX6UNjs.isTextFile; exports.name = _chunkVJLWHQ5Bjs.name; exports.uploadFile = _chunkCLCKX6UNjs.uploadFile;