@storm-software/cloudflare-tools 0.71.209 → 0.71.211
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 +20 -0
- package/README.md +1 -1
- package/dist/{chunk-KW5NUAMY.js → chunk-66HLJNAF.js} +2 -2
- package/dist/{chunk-37JKGWKW.mjs → chunk-6Z2WUPYH.mjs} +4 -4
- package/dist/{chunk-J725S66W.js → chunk-AYBX4RT3.js} +29 -1
- package/dist/{chunk-F5RW4AZL.mjs → chunk-CSTZEHUP.mjs} +2 -73
- package/dist/chunk-E52DON6Y.mjs +132 -0
- package/dist/chunk-E7ITICBK.js +77 -0
- package/dist/chunk-FBLD25X4.js +93 -0
- package/dist/{chunk-O7L7SGHE.js → chunk-KUGKM6MY.js} +5 -5
- package/dist/{chunk-LBHXS7RE.js → chunk-O327KKPU.js} +2 -2
- package/dist/{chunk-FEGLXQK4.mjs → chunk-OL24QIXM.mjs} +1 -1
- package/dist/chunk-T6GKRQUF.mjs +77 -0
- package/dist/{chunk-TNVZ6KHS.mjs → chunk-U6OMVOFA.mjs} +1 -1
- package/dist/chunk-VJLWHQ5B.js +132 -0
- package/dist/{chunk-76FQTDEJ.mjs → chunk-W3KWAUKY.mjs} +1 -1
- package/dist/{chunk-U7XMCD6Y.js → chunk-XB6S7S3C.js} +3 -3
- package/dist/{chunk-BQRUV3SX.mjs → chunk-Z7HN5SJV.mjs} +29 -1
- package/dist/executors.js +5 -4
- package/dist/executors.mjs +5 -4
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.d.mts +2 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +23 -144
- package/dist/index.mjs +11 -132
- package/dist/src/executors/cloudflare-publish/executor.js +5 -4
- package/dist/src/executors/cloudflare-publish/executor.mjs +4 -3
- package/dist/src/executors/r2-upload-publish/executor.js +4 -3
- package/dist/src/executors/r2-upload-publish/executor.mjs +3 -2
- package/dist/src/executors/r2-upload-publish/untyped.d.mts +5 -0
- package/dist/src/executors/r2-upload-publish/untyped.d.ts +5 -0
- package/dist/src/executors/r2-upload-publish/untyped.js +86 -0
- package/dist/src/executors/r2-upload-publish/untyped.mjs +86 -0
- package/dist/src/executors/serve/executor.js +5 -4
- package/dist/src/executors/serve/executor.mjs +3 -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 +3 -3
- package/dist/src/generators/worker/generator.mjs +2 -2
- package/dist/src/plugins/index.d.mts +6 -0
- package/dist/src/plugins/index.d.ts +6 -0
- package/dist/src/plugins/index.js +10 -0
- package/dist/src/plugins/index.mjs +10 -0
- package/package.json +33 -5
- package/dist/chunk-XKQ3HGET.js +0 -164
- package/dist/tsup.config.d.mts +0 -5
- package/dist/tsup.config.d.ts +0 -5
- package/dist/tsup.config.js +0 -31
- package/dist/tsup.config.mjs +0 -31
|
@@ -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
|
|
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 =
|
|
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 =
|
|
67
|
+
const args = _chunkE7ITICBKjs.createCliOptions.call(void 0, { ...options });
|
|
68
68
|
if (isDryRun) {
|
|
69
69
|
args.push("--dry-run");
|
|
70
70
|
}
|
|
@@ -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.
|
|
10
|
+
version: "0.71.209",
|
|
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",
|
package/dist/executors.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";require('./chunk-XO66D74Z.js');
|
|
2
|
-
require('./chunk-
|
|
2
|
+
require('./chunk-XB6S7S3C.js');
|
|
3
3
|
require('./chunk-KUGEZPUO.js');
|
|
4
4
|
require('./chunk-CLCKX6UN.js');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
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');
|
package/dist/executors.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "./chunk-YSCEY447.mjs";
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-U6OMVOFA.mjs";
|
|
3
3
|
import "./chunk-SWYYMID7.mjs";
|
|
4
4
|
import "./chunk-BY7MA3SM.mjs";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
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";
|
package/dist/generators.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk66HLJNAFjs = require('./chunk-66HLJNAF.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkAYBX4RT3js = require('./chunk-AYBX4RT3.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 =
|
|
18
|
+
exports.applicationGenerator = _chunk66HLJNAFjs.applicationGenerator; exports.applicationSchematic = _chunk66HLJNAFjs.applicationSchematic; exports.initGenerator = _chunkAYBX4RT3js.initGenerator; exports.initSchematic = _chunkAYBX4RT3js.initSchematic;
|
package/dist/generators.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import "./chunk-3J7KBHMJ.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
applicationGenerator,
|
|
4
4
|
applicationSchematic
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-W3KWAUKY.mjs";
|
|
6
6
|
import {
|
|
7
7
|
initGenerator,
|
|
8
8
|
initSchematic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Z7HN5SJV.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
|
-
|
|
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
|
-
|
|
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});
|
|
2
|
-
require('./chunk-
|
|
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
|
|
7
|
+
var _chunk66HLJNAFjs = require('./chunk-66HLJNAF.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('./chunk-KUGEZPUO.js');
|
|
13
|
-
require('./chunk-CVGPWUNP.js');
|
|
11
|
+
var _chunkAYBX4RT3js = require('./chunk-AYBX4RT3.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
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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 = _chunkKW5NUAMYjs.applicationGenerator; exports.applicationSchematic = _chunkKW5NUAMYjs.applicationSchematic; exports.createNodesV2 = createNodesV2; exports.getEncoding = _chunkCLCKX6UNjs.getEncoding; exports.getInternalDependencies = _chunkCLCKX6UNjs.getInternalDependencies; exports.initGenerator = _chunkJ725S66Wjs.initGenerator; exports.initSchematic = _chunkJ725S66Wjs.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 = _chunk66HLJNAFjs.applicationGenerator; exports.applicationSchematic = _chunk66HLJNAFjs.applicationSchematic; exports.createNodesV2 = _chunkVJLWHQ5Bjs.createNodesV2; exports.getEncoding = _chunkCLCKX6UNjs.getEncoding; exports.getInternalDependencies = _chunkCLCKX6UNjs.getInternalDependencies; exports.initGenerator = _chunkAYBX4RT3js.initGenerator; exports.initSchematic = _chunkAYBX4RT3js.initSchematic; exports.isTextFile = _chunkCLCKX6UNjs.isTextFile; exports.name = _chunkVJLWHQ5Bjs.name; exports.uploadFile = _chunkCLCKX6UNjs.uploadFile;
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import "./chunk-YSCEY447.mjs";
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-U6OMVOFA.mjs";
|
|
3
3
|
import "./chunk-3J7KBHMJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
applicationGenerator,
|
|
6
6
|
applicationSchematic
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W3KWAUKY.mjs";
|
|
8
8
|
import {
|
|
9
9
|
initGenerator,
|
|
10
10
|
initSchematic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Z7HN5SJV.mjs";
|
|
12
|
+
import {
|
|
13
|
+
createNodesV2,
|
|
14
|
+
name
|
|
15
|
+
} from "./chunk-E52DON6Y.mjs";
|
|
12
16
|
import "./chunk-SWYYMID7.mjs";
|
|
13
17
|
import "./chunk-7Z5PILRU.mjs";
|
|
14
18
|
import {
|
|
@@ -17,138 +21,13 @@ import {
|
|
|
17
21
|
isTextFile,
|
|
18
22
|
uploadFile
|
|
19
23
|
} from "./chunk-BY7MA3SM.mjs";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import
|
|
23
|
-
ProjectTagConstants,
|
|
24
|
-
addProjectTag
|
|
25
|
-
} from "./chunk-F5RW4AZL.mjs";
|
|
24
|
+
import "./chunk-OL24QIXM.mjs";
|
|
25
|
+
import "./chunk-6Z2WUPYH.mjs";
|
|
26
|
+
import "./chunk-T6GKRQUF.mjs";
|
|
26
27
|
import "./chunk-5MAMLVMV.mjs";
|
|
28
|
+
import "./chunk-CSTZEHUP.mjs";
|
|
27
29
|
import "./chunk-K4H5ZMYA.mjs";
|
|
28
30
|
import "./chunk-5RBVGYWH.mjs";
|
|
29
|
-
|
|
30
|
-
// src/plugins/index.ts
|
|
31
|
-
import {
|
|
32
|
-
createNodesFromFiles
|
|
33
|
-
} from "@nx/devkit";
|
|
34
|
-
import defu from "defu";
|
|
35
|
-
import { existsSync } from "node:fs";
|
|
36
|
-
import { dirname, join } from "node:path";
|
|
37
|
-
import { readJsonFile } from "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 createNodesFromFiles(
|
|
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
|
-
addProjectTag(
|
|
82
|
-
project,
|
|
83
|
-
ProjectTagConstants.ProjectType.TAG_ID,
|
|
84
|
-
project.projectType === "application" ? ProjectTagConstants.ProjectType.APPLICATION : ProjectTagConstants.ProjectType.LIBRARY,
|
|
85
|
-
{ overwrite: true }
|
|
86
|
-
);
|
|
87
|
-
addProjectTag(
|
|
88
|
-
project,
|
|
89
|
-
ProjectTagConstants.DistStyle.TAG_ID,
|
|
90
|
-
ProjectTagConstants.DistStyle.CLEAN,
|
|
91
|
-
{ overwrite: true }
|
|
92
|
-
);
|
|
93
|
-
addProjectTag(
|
|
94
|
-
project,
|
|
95
|
-
ProjectTagConstants.Provider.TAG_ID,
|
|
96
|
-
"cloudflare",
|
|
97
|
-
{
|
|
98
|
-
overwrite: true
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
const projects = {};
|
|
102
|
-
const externalNodes = {};
|
|
103
|
-
projects[project.root] = defu(
|
|
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 = dirname(projectJsonPath);
|
|
132
|
-
return {
|
|
133
|
-
...nx,
|
|
134
|
-
name: name2,
|
|
135
|
-
root,
|
|
136
|
-
targets: {}
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function createPackageJson(projectJsonPath, workspaceRoot) {
|
|
140
|
-
try {
|
|
141
|
-
const root = dirname(projectJsonPath);
|
|
142
|
-
const packageJsonPath = join(workspaceRoot, root, "package.json");
|
|
143
|
-
if (!existsSync(packageJsonPath)) {
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
return readJsonFile(packageJsonPath);
|
|
147
|
-
} catch (e) {
|
|
148
|
-
console.log(e);
|
|
149
|
-
return null;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
31
|
export {
|
|
153
32
|
applicationGenerator,
|
|
154
33
|
applicationSchematic,
|