@storm-software/cloudflare-tools 0.48.0 → 0.49.0
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 +10 -0
- package/dist/chunk-3J7KBHMJ.mjs +0 -0
- package/dist/chunk-7Z5PILRU.mjs +0 -0
- package/dist/chunk-A4ZIZ2JU.mjs +228 -0
- package/dist/chunk-A7FFSBE6.mjs +26 -0
- package/dist/chunk-CVGPWUNP.js +1 -0
- package/dist/chunk-DHBG5ASJ.js +1 -0
- package/dist/chunk-I4XNMV5U.js +227 -0
- package/dist/chunk-J5SB6L2L.js +18 -0
- package/dist/chunk-JCB2DTP6.js +42 -0
- package/dist/chunk-KKOHB7JH.js +239 -0
- package/dist/chunk-MTM5OTKD.mjs +239 -0
- package/dist/chunk-NKCR3FSU.js +153 -0
- package/dist/chunk-NSLK6ZDO.mjs +603 -0
- package/dist/chunk-OARYMVO7.mjs +501 -0
- package/dist/chunk-OJNZ4PXQ.mjs +3466 -0
- package/dist/chunk-QEWY5YJA.mjs +89 -0
- package/dist/chunk-R7AIVBS7.js +89 -0
- package/dist/chunk-RCE3CC76.js +603 -0
- package/dist/chunk-VPT6GF3S.mjs +153 -0
- package/dist/chunk-VTHBMY4B.js +133 -0
- package/dist/chunk-VYOULWAK.mjs +42 -0
- package/dist/chunk-XO66D74Z.js +1 -0
- package/dist/chunk-XU6MTFCV.mjs +133 -0
- package/dist/chunk-YE4FHRXJ.js +501 -0
- package/dist/chunk-YSCEY447.mjs +0 -0
- package/dist/chunk-Z46UO4N7.js +3465 -0
- package/dist/executors.d.mts +2 -0
- package/dist/executors.d.ts +2 -0
- package/dist/executors.js +9 -0
- package/dist/executors.mjs +9 -0
- package/dist/generator-DJ1RuHyR.d.mts +14 -0
- package/dist/generator-DJ1RuHyR.d.ts +14 -0
- package/dist/generator-DW-9W9Fk.d.mts +22 -0
- package/dist/generator-DW-9W9Fk.d.ts +22 -0
- package/dist/generators.d.mts +4 -0
- package/dist/generators.d.ts +4 -0
- package/dist/generators.js +18 -0
- package/dist/generators.mjs +18 -0
- package/dist/index.d.mts +45 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +151 -0
- package/dist/index.mjs +151 -0
- package/dist/schema.d-DgA16PUG.d.mts +24 -0
- package/dist/schema.d-DgA16PUG.d.ts +24 -0
- package/dist/schema.d-oSirXiCO.d.mts +11 -0
- package/dist/schema.d-oSirXiCO.d.ts +11 -0
- package/dist/src/executors/cloudflare-publish/executor.d.mts +8 -0
- package/dist/src/executors/cloudflare-publish/executor.d.ts +8 -0
- package/dist/src/executors/cloudflare-publish/executor.js +11 -0
- package/dist/src/executors/cloudflare-publish/executor.mjs +11 -0
- package/dist/src/executors/r2-upload-publish/executor.d.mts +8 -0
- package/dist/src/executors/r2-upload-publish/executor.d.ts +8 -0
- package/dist/src/executors/r2-upload-publish/executor.js +11 -0
- package/dist/src/executors/r2-upload-publish/executor.mjs +11 -0
- package/dist/src/executors/serve/executor.d.mts +1240 -0
- package/dist/src/executors/serve/executor.d.ts +1240 -0
- package/dist/src/executors/serve/executor.js +75 -0
- package/dist/src/executors/serve/executor.mjs +75 -0
- package/dist/src/executors/serve/schema.d.ts +1 -1
- package/dist/src/generators/init/generator.d.mts +2 -0
- package/dist/src/generators/init/generator.d.ts +2 -0
- package/dist/src/generators/init/generator.js +11 -0
- package/dist/src/generators/init/generator.mjs +11 -0
- package/dist/src/generators/worker/generator.d.mts +3 -0
- package/dist/src/generators/worker/generator.d.ts +3 -0
- package/dist/src/generators/worker/generator.js +14 -0
- package/dist/src/generators/worker/generator.mjs +14 -0
- package/dist/src/utils/index.d.mts +3 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.js +11 -0
- package/dist/src/utils/index.mjs +11 -0
- package/dist/src/utils/r2-bucket-helpers.d.mts +7 -0
- package/dist/src/utils/r2-bucket-helpers.d.ts +7 -0
- package/dist/src/utils/r2-bucket-helpers.js +10 -0
- package/dist/src/utils/r2-bucket-helpers.mjs +10 -0
- package/dist/tsup.config.d.mts +5 -0
- package/dist/tsup.config.d.ts +5 -0
- package/dist/tsup.config.js +35 -0
- package/dist/tsup.config.mjs +35 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";require('./chunk-XO66D74Z.js');
|
|
2
|
+
require('./chunk-R7AIVBS7.js');
|
|
3
|
+
require('./chunk-Z46UO4N7.js');
|
|
4
|
+
require('./chunk-NKCR3FSU.js');
|
|
5
|
+
require('./chunk-JCB2DTP6.js');
|
|
6
|
+
require('./chunk-VTHBMY4B.js');
|
|
7
|
+
require('./chunk-YE4FHRXJ.js');
|
|
8
|
+
require('./chunk-RCE3CC76.js');
|
|
9
|
+
require('./chunk-J5SB6L2L.js');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./chunk-YSCEY447.mjs";
|
|
2
|
+
import "./chunk-QEWY5YJA.mjs";
|
|
3
|
+
import "./chunk-OJNZ4PXQ.mjs";
|
|
4
|
+
import "./chunk-VPT6GF3S.mjs";
|
|
5
|
+
import "./chunk-VYOULWAK.mjs";
|
|
6
|
+
import "./chunk-XU6MTFCV.mjs";
|
|
7
|
+
import "./chunk-OARYMVO7.mjs";
|
|
8
|
+
import "./chunk-NSLK6ZDO.mjs";
|
|
9
|
+
import "./chunk-A7FFSBE6.mjs";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
|
|
3
|
+
interface InitGeneratorSchema {
|
|
4
|
+
unitTestRunner?: "vitest" | "jest" | "none";
|
|
5
|
+
skipFormat?: boolean;
|
|
6
|
+
js?: boolean;
|
|
7
|
+
template?: "fetch-handler" | "scheduled-handler" | "hono" | "none";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare function initGenerator(tree: Tree, schema: InitGeneratorSchema): Promise<() => Promise<void>>;
|
|
11
|
+
|
|
12
|
+
declare const initSchematic: (generatorOptions: InitGeneratorSchema) => (tree: any, context: any) => Promise<any>;
|
|
13
|
+
|
|
14
|
+
export { type InitGeneratorSchema as I, initSchematic as a, initGenerator as i };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
|
|
3
|
+
interface InitGeneratorSchema {
|
|
4
|
+
unitTestRunner?: "vitest" | "jest" | "none";
|
|
5
|
+
skipFormat?: boolean;
|
|
6
|
+
js?: boolean;
|
|
7
|
+
template?: "fetch-handler" | "scheduled-handler" | "hono" | "none";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare function initGenerator(tree: Tree, schema: InitGeneratorSchema): Promise<() => Promise<void>>;
|
|
11
|
+
|
|
12
|
+
declare const initSchematic: (generatorOptions: InitGeneratorSchema) => (tree: any, context: any) => Promise<any>;
|
|
13
|
+
|
|
14
|
+
export { type InitGeneratorSchema as I, initSchematic as a, initGenerator as i };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Tree, GeneratorCallback } from '@nx/devkit';
|
|
2
|
+
import { TypeScriptLibraryGeneratorSchema } from '@storm-software/workspace-tools';
|
|
3
|
+
|
|
4
|
+
type WorkerGeneratorSchema = TypeScriptLibraryGeneratorSchema & {
|
|
5
|
+
template?: "fetch-handler" | "scheduled-handler" | "hono" | "none";
|
|
6
|
+
js?: boolean;
|
|
7
|
+
unitTestRunner?: "vitest" | "none";
|
|
8
|
+
directory?: string;
|
|
9
|
+
rootProject?: boolean;
|
|
10
|
+
tags?: string;
|
|
11
|
+
frontendProject?: string;
|
|
12
|
+
skipFormat?: boolean;
|
|
13
|
+
port?: number;
|
|
14
|
+
accountId?: string;
|
|
15
|
+
addPlugin?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare function applicationGenerator(tree: Tree, schema: WorkerGeneratorSchema): Promise<GeneratorCallback>;
|
|
19
|
+
|
|
20
|
+
declare const applicationSchematic: (generatorOptions: any) => (tree: any, context: any) => Promise<any>;
|
|
21
|
+
|
|
22
|
+
export { type WorkerGeneratorSchema as W, applicationGenerator as a, applicationSchematic as b };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Tree, GeneratorCallback } from '@nx/devkit';
|
|
2
|
+
import { TypeScriptLibraryGeneratorSchema } from '@storm-software/workspace-tools';
|
|
3
|
+
|
|
4
|
+
type WorkerGeneratorSchema = TypeScriptLibraryGeneratorSchema & {
|
|
5
|
+
template?: "fetch-handler" | "scheduled-handler" | "hono" | "none";
|
|
6
|
+
js?: boolean;
|
|
7
|
+
unitTestRunner?: "vitest" | "none";
|
|
8
|
+
directory?: string;
|
|
9
|
+
rootProject?: boolean;
|
|
10
|
+
tags?: string;
|
|
11
|
+
frontendProject?: string;
|
|
12
|
+
skipFormat?: boolean;
|
|
13
|
+
port?: number;
|
|
14
|
+
accountId?: string;
|
|
15
|
+
addPlugin?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare function applicationGenerator(tree: Tree, schema: WorkerGeneratorSchema): Promise<GeneratorCallback>;
|
|
19
|
+
|
|
20
|
+
declare const applicationSchematic: (generatorOptions: any) => (tree: any, context: any) => Promise<any>;
|
|
21
|
+
|
|
22
|
+
export { type WorkerGeneratorSchema as W, applicationGenerator as a, applicationSchematic as b };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { I as InitGeneratorSchema, i as initGenerator, a as initSchematic } from './generator-DJ1RuHyR.mjs';
|
|
2
|
+
export { W as WorkerGeneratorSchema, a as applicationGenerator, b as applicationSchematic } from './generator-DW-9W9Fk.mjs';
|
|
3
|
+
import '@nx/devkit';
|
|
4
|
+
import '@storm-software/workspace-tools';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { I as InitGeneratorSchema, i as initGenerator, a as initSchematic } from './generator-DJ1RuHyR.js';
|
|
2
|
+
export { W as WorkerGeneratorSchema, a as applicationGenerator, b as applicationSchematic } from './generator-DW-9W9Fk.js';
|
|
3
|
+
import '@nx/devkit';
|
|
4
|
+
import '@storm-software/workspace-tools';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-DHBG5ASJ.js');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkI4XNMV5Ujs = require('./chunk-I4XNMV5U.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkKKOHB7JHjs = require('./chunk-KKOHB7JH.js');
|
|
10
|
+
require('./chunk-YE4FHRXJ.js');
|
|
11
|
+
require('./chunk-RCE3CC76.js');
|
|
12
|
+
require('./chunk-J5SB6L2L.js');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.applicationGenerator = _chunkI4XNMV5Ujs.applicationGenerator; exports.applicationSchematic = _chunkI4XNMV5Ujs.applicationSchematic; exports.initGenerator = _chunkKKOHB7JHjs.initGenerator; exports.initSchematic = _chunkKKOHB7JHjs.initSchematic;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "./chunk-3J7KBHMJ.mjs";
|
|
2
|
+
import {
|
|
3
|
+
applicationGenerator,
|
|
4
|
+
applicationSchematic
|
|
5
|
+
} from "./chunk-A4ZIZ2JU.mjs";
|
|
6
|
+
import {
|
|
7
|
+
initGenerator,
|
|
8
|
+
initSchematic
|
|
9
|
+
} from "./chunk-MTM5OTKD.mjs";
|
|
10
|
+
import "./chunk-OARYMVO7.mjs";
|
|
11
|
+
import "./chunk-NSLK6ZDO.mjs";
|
|
12
|
+
import "./chunk-A7FFSBE6.mjs";
|
|
13
|
+
export {
|
|
14
|
+
applicationGenerator,
|
|
15
|
+
applicationSchematic,
|
|
16
|
+
initGenerator,
|
|
17
|
+
initSchematic
|
|
18
|
+
};
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export { C as CloudflarePublishExecutorSchema } from './schema.d-DgA16PUG.mjs';
|
|
2
|
+
export { R as R2UploadPublishExecutorSchema } from './schema.d-oSirXiCO.mjs';
|
|
3
|
+
export { I as InitGeneratorSchema, i as initGenerator, a as initSchematic } from './generator-DJ1RuHyR.mjs';
|
|
4
|
+
export { W as WorkerGeneratorSchema, a as applicationGenerator, b as applicationSchematic } from './generator-DW-9W9Fk.mjs';
|
|
5
|
+
import * as nx_src_config_workspace_json_project_json from 'nx/src/config/workspace-json-project-json';
|
|
6
|
+
import * as _nx_devkit from '@nx/devkit';
|
|
7
|
+
export { getInternalDependencies, r2UploadFile } from './src/utils/r2-bucket-helpers.mjs';
|
|
8
|
+
import '@storm-software/workspace-tools';
|
|
9
|
+
import '@aws-sdk/client-s3';
|
|
10
|
+
|
|
11
|
+
declare const name = "storm-software/cloudflare";
|
|
12
|
+
declare const createNodes: (string | ((file: any, _: any, ctx: any) => {
|
|
13
|
+
projects?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
projects: {
|
|
16
|
+
[x: string]: {
|
|
17
|
+
targets: {
|
|
18
|
+
[targetName: string]: _nx_devkit.TargetConfiguration<any>;
|
|
19
|
+
};
|
|
20
|
+
release: {
|
|
21
|
+
version: {
|
|
22
|
+
generator: string;
|
|
23
|
+
generatorOptions?: Record<string, unknown>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
name?: string;
|
|
27
|
+
root: string;
|
|
28
|
+
sourceRoot?: string;
|
|
29
|
+
projectType?: _nx_devkit.ProjectType;
|
|
30
|
+
generators?: {
|
|
31
|
+
[collectionName: string]: {
|
|
32
|
+
[generatorName: string]: any;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
implicitDependencies?: string[];
|
|
36
|
+
namedInputs?: {
|
|
37
|
+
[inputName: string]: (string | nx_src_config_workspace_json_project_json.InputDefinition)[];
|
|
38
|
+
};
|
|
39
|
+
tags?: string[];
|
|
40
|
+
metadata?: nx_src_config_workspace_json_project_json.ProjectMetadata;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}))[];
|
|
44
|
+
|
|
45
|
+
export { createNodes, name };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export { C as CloudflarePublishExecutorSchema } from './schema.d-DgA16PUG.js';
|
|
2
|
+
export { R as R2UploadPublishExecutorSchema } from './schema.d-oSirXiCO.js';
|
|
3
|
+
export { I as InitGeneratorSchema, i as initGenerator, a as initSchematic } from './generator-DJ1RuHyR.js';
|
|
4
|
+
export { W as WorkerGeneratorSchema, a as applicationGenerator, b as applicationSchematic } from './generator-DW-9W9Fk.js';
|
|
5
|
+
import * as nx_src_config_workspace_json_project_json from 'nx/src/config/workspace-json-project-json';
|
|
6
|
+
import * as _nx_devkit from '@nx/devkit';
|
|
7
|
+
export { getInternalDependencies, r2UploadFile } from './src/utils/r2-bucket-helpers.js';
|
|
8
|
+
import '@storm-software/workspace-tools';
|
|
9
|
+
import '@aws-sdk/client-s3';
|
|
10
|
+
|
|
11
|
+
declare const name = "storm-software/cloudflare";
|
|
12
|
+
declare const createNodes: (string | ((file: any, _: any, ctx: any) => {
|
|
13
|
+
projects?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
projects: {
|
|
16
|
+
[x: string]: {
|
|
17
|
+
targets: {
|
|
18
|
+
[targetName: string]: _nx_devkit.TargetConfiguration<any>;
|
|
19
|
+
};
|
|
20
|
+
release: {
|
|
21
|
+
version: {
|
|
22
|
+
generator: string;
|
|
23
|
+
generatorOptions?: Record<string, unknown>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
name?: string;
|
|
27
|
+
root: string;
|
|
28
|
+
sourceRoot?: string;
|
|
29
|
+
projectType?: _nx_devkit.ProjectType;
|
|
30
|
+
generators?: {
|
|
31
|
+
[collectionName: string]: {
|
|
32
|
+
[generatorName: string]: any;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
implicitDependencies?: string[];
|
|
36
|
+
namedInputs?: {
|
|
37
|
+
[inputName: string]: (string | nx_src_config_workspace_json_project_json.InputDefinition)[];
|
|
38
|
+
};
|
|
39
|
+
tags?: string[];
|
|
40
|
+
metadata?: nx_src_config_workspace_json_project_json.ProjectMetadata;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}))[];
|
|
44
|
+
|
|
45
|
+
export { createNodes, name };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }require('./chunk-XO66D74Z.js');
|
|
2
|
+
require('./chunk-DHBG5ASJ.js');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkI4XNMV5Ujs = require('./chunk-I4XNMV5U.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkKKOHB7JHjs = require('./chunk-KKOHB7JH.js');
|
|
11
|
+
require('./chunk-CVGPWUNP.js');
|
|
12
|
+
require('./chunk-R7AIVBS7.js');
|
|
13
|
+
require('./chunk-Z46UO4N7.js');
|
|
14
|
+
require('./chunk-NKCR3FSU.js');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunkJCB2DTP6js = require('./chunk-JCB2DTP6.js');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
|
|
23
|
+
require('./chunk-YE4FHRXJ.js');
|
|
24
|
+
require('./chunk-RCE3CC76.js');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
28
|
+
|
|
29
|
+
// src/plugins/index.ts
|
|
30
|
+
var _fs = require('fs');
|
|
31
|
+
var _path = require('path');
|
|
32
|
+
var _nxjsonjs = require('nx/src/config/nx-json.js');
|
|
33
|
+
var _fileutils = require('nx/src/utils/fileutils');
|
|
34
|
+
var _packagejson = require('nx/src/utils/package-json');
|
|
35
|
+
var name = "storm-software/cloudflare";
|
|
36
|
+
var createNodes = [
|
|
37
|
+
"{**/wrangler.toml}",
|
|
38
|
+
(file, _, ctx) => {
|
|
39
|
+
const packageJson = createPackageJson(file, ctx.workspaceRoot);
|
|
40
|
+
if (!packageJson) {
|
|
41
|
+
return {};
|
|
42
|
+
}
|
|
43
|
+
const project = createProjectFromPackageJsonNextToProjectJson(file, packageJson);
|
|
44
|
+
const nxJson = _nxjsonjs.readNxJson.call(void 0, ctx.workspaceRoot);
|
|
45
|
+
const targets = _packagejson.readTargetsFromPackageJson.call(void 0, packageJson, nxJson);
|
|
46
|
+
targets["serve"] = {
|
|
47
|
+
cache: false,
|
|
48
|
+
inputs: [
|
|
49
|
+
"typescript",
|
|
50
|
+
"^production"
|
|
51
|
+
],
|
|
52
|
+
dependsOn: [
|
|
53
|
+
"build"
|
|
54
|
+
],
|
|
55
|
+
executor: "@storm-software/cloudflare-tools:serve",
|
|
56
|
+
options: {
|
|
57
|
+
port: 4500
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
targets["clean-package"] = {
|
|
61
|
+
cache: true,
|
|
62
|
+
dependsOn: [
|
|
63
|
+
"build"
|
|
64
|
+
],
|
|
65
|
+
inputs: [
|
|
66
|
+
"typescript",
|
|
67
|
+
"^production"
|
|
68
|
+
],
|
|
69
|
+
outputs: [
|
|
70
|
+
"{workspaceRoot}/dist/{projectRoot}"
|
|
71
|
+
],
|
|
72
|
+
executor: "@storm-software/workspace-tools:clean-package",
|
|
73
|
+
options: {
|
|
74
|
+
cleanReadMe: true,
|
|
75
|
+
cleanComments: true
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
targets["nx-release-publish"] = {
|
|
79
|
+
cache: false,
|
|
80
|
+
inputs: [
|
|
81
|
+
"typescript",
|
|
82
|
+
"^production"
|
|
83
|
+
],
|
|
84
|
+
dependsOn: [
|
|
85
|
+
"clean-package",
|
|
86
|
+
"^nx-release-publish"
|
|
87
|
+
],
|
|
88
|
+
executor: "@storm-software/cloudflare-tools:cloudflare-publish",
|
|
89
|
+
options: {}
|
|
90
|
+
};
|
|
91
|
+
_chunkVTHBMY4Bjs.addProjectTag.call(void 0, project, _chunkVTHBMY4Bjs.ProjectTagConstants.ProjectType.TAG_ID, project.projectType === "application" ? _chunkVTHBMY4Bjs.ProjectTagConstants.ProjectType.APPLICATION : _chunkVTHBMY4Bjs.ProjectTagConstants.ProjectType.LIBRARY, {
|
|
92
|
+
overwrite: true
|
|
93
|
+
});
|
|
94
|
+
_chunkVTHBMY4Bjs.addProjectTag.call(void 0, project, _chunkVTHBMY4Bjs.ProjectTagConstants.DistStyle.TAG_ID, _chunkVTHBMY4Bjs.ProjectTagConstants.DistStyle.CLEAN, {
|
|
95
|
+
overwrite: true
|
|
96
|
+
});
|
|
97
|
+
_chunkVTHBMY4Bjs.addProjectTag.call(void 0, project, _chunkVTHBMY4Bjs.ProjectTagConstants.Provider.TAG_ID, "cloudflare", {
|
|
98
|
+
overwrite: true
|
|
99
|
+
});
|
|
100
|
+
return _optionalChain([project, 'optionalAccess', _2 => _2.name]) ? {
|
|
101
|
+
projects: {
|
|
102
|
+
[project.name]: {
|
|
103
|
+
...project,
|
|
104
|
+
targets,
|
|
105
|
+
release: {
|
|
106
|
+
..._optionalChain([project, 'optionalAccess', _3 => _3.release]),
|
|
107
|
+
version: {
|
|
108
|
+
..._optionalChain([project, 'optionalAccess', _4 => _4.release, 'optionalAccess', _5 => _5.version]),
|
|
109
|
+
generator: "@storm-software/workspace-tools:release-version"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} : {};
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, packageJson) {
|
|
118
|
+
const { nx, name: name2 } = packageJson;
|
|
119
|
+
const root = _path.dirname.call(void 0, projectJsonPath);
|
|
120
|
+
return {
|
|
121
|
+
...nx,
|
|
122
|
+
name: name2,
|
|
123
|
+
root,
|
|
124
|
+
targets: {}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
_chunkJ5SB6L2Ljs.__name.call(void 0, createProjectFromPackageJsonNextToProjectJson, "createProjectFromPackageJsonNextToProjectJson");
|
|
128
|
+
function createPackageJson(projectJsonPath, workspaceRoot) {
|
|
129
|
+
try {
|
|
130
|
+
const root = _path.dirname.call(void 0, projectJsonPath);
|
|
131
|
+
const packageJsonPath = _path.join.call(void 0, workspaceRoot, root, "package.json");
|
|
132
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
return _fileutils.readJsonFile.call(void 0, packageJsonPath);
|
|
136
|
+
} catch (e) {
|
|
137
|
+
console.log(e);
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
_chunkJ5SB6L2Ljs.__name.call(void 0, createPackageJson, "createPackageJson");
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
exports.applicationGenerator = _chunkI4XNMV5Ujs.applicationGenerator; exports.applicationSchematic = _chunkI4XNMV5Ujs.applicationSchematic; exports.createNodes = createNodes; exports.getInternalDependencies = _chunkJCB2DTP6js.getInternalDependencies; exports.initGenerator = _chunkKKOHB7JHjs.initGenerator; exports.initSchematic = _chunkKKOHB7JHjs.initSchematic; exports.name = name; exports.r2UploadFile = _chunkJCB2DTP6js.r2UploadFile;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import "./chunk-YSCEY447.mjs";
|
|
2
|
+
import "./chunk-3J7KBHMJ.mjs";
|
|
3
|
+
import {
|
|
4
|
+
applicationGenerator,
|
|
5
|
+
applicationSchematic
|
|
6
|
+
} from "./chunk-A4ZIZ2JU.mjs";
|
|
7
|
+
import {
|
|
8
|
+
initGenerator,
|
|
9
|
+
initSchematic
|
|
10
|
+
} from "./chunk-MTM5OTKD.mjs";
|
|
11
|
+
import "./chunk-7Z5PILRU.mjs";
|
|
12
|
+
import "./chunk-QEWY5YJA.mjs";
|
|
13
|
+
import "./chunk-OJNZ4PXQ.mjs";
|
|
14
|
+
import "./chunk-VPT6GF3S.mjs";
|
|
15
|
+
import {
|
|
16
|
+
getInternalDependencies,
|
|
17
|
+
r2UploadFile
|
|
18
|
+
} from "./chunk-VYOULWAK.mjs";
|
|
19
|
+
import {
|
|
20
|
+
ProjectTagConstants,
|
|
21
|
+
addProjectTag
|
|
22
|
+
} from "./chunk-XU6MTFCV.mjs";
|
|
23
|
+
import "./chunk-OARYMVO7.mjs";
|
|
24
|
+
import "./chunk-NSLK6ZDO.mjs";
|
|
25
|
+
import {
|
|
26
|
+
__name
|
|
27
|
+
} from "./chunk-A7FFSBE6.mjs";
|
|
28
|
+
|
|
29
|
+
// src/plugins/index.ts
|
|
30
|
+
import { existsSync } from "node:fs";
|
|
31
|
+
import { dirname, join } from "node:path";
|
|
32
|
+
import { readNxJson } from "nx/src/config/nx-json.js";
|
|
33
|
+
import { readJsonFile } from "nx/src/utils/fileutils";
|
|
34
|
+
import { readTargetsFromPackageJson } from "nx/src/utils/package-json";
|
|
35
|
+
var name = "storm-software/cloudflare";
|
|
36
|
+
var createNodes = [
|
|
37
|
+
"{**/wrangler.toml}",
|
|
38
|
+
(file, _, ctx) => {
|
|
39
|
+
const packageJson = createPackageJson(file, ctx.workspaceRoot);
|
|
40
|
+
if (!packageJson) {
|
|
41
|
+
return {};
|
|
42
|
+
}
|
|
43
|
+
const project = createProjectFromPackageJsonNextToProjectJson(file, packageJson);
|
|
44
|
+
const nxJson = readNxJson(ctx.workspaceRoot);
|
|
45
|
+
const targets = readTargetsFromPackageJson(packageJson, nxJson);
|
|
46
|
+
targets["serve"] = {
|
|
47
|
+
cache: false,
|
|
48
|
+
inputs: [
|
|
49
|
+
"typescript",
|
|
50
|
+
"^production"
|
|
51
|
+
],
|
|
52
|
+
dependsOn: [
|
|
53
|
+
"build"
|
|
54
|
+
],
|
|
55
|
+
executor: "@storm-software/cloudflare-tools:serve",
|
|
56
|
+
options: {
|
|
57
|
+
port: 4500
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
targets["clean-package"] = {
|
|
61
|
+
cache: true,
|
|
62
|
+
dependsOn: [
|
|
63
|
+
"build"
|
|
64
|
+
],
|
|
65
|
+
inputs: [
|
|
66
|
+
"typescript",
|
|
67
|
+
"^production"
|
|
68
|
+
],
|
|
69
|
+
outputs: [
|
|
70
|
+
"{workspaceRoot}/dist/{projectRoot}"
|
|
71
|
+
],
|
|
72
|
+
executor: "@storm-software/workspace-tools:clean-package",
|
|
73
|
+
options: {
|
|
74
|
+
cleanReadMe: true,
|
|
75
|
+
cleanComments: true
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
targets["nx-release-publish"] = {
|
|
79
|
+
cache: false,
|
|
80
|
+
inputs: [
|
|
81
|
+
"typescript",
|
|
82
|
+
"^production"
|
|
83
|
+
],
|
|
84
|
+
dependsOn: [
|
|
85
|
+
"clean-package",
|
|
86
|
+
"^nx-release-publish"
|
|
87
|
+
],
|
|
88
|
+
executor: "@storm-software/cloudflare-tools:cloudflare-publish",
|
|
89
|
+
options: {}
|
|
90
|
+
};
|
|
91
|
+
addProjectTag(project, ProjectTagConstants.ProjectType.TAG_ID, project.projectType === "application" ? ProjectTagConstants.ProjectType.APPLICATION : ProjectTagConstants.ProjectType.LIBRARY, {
|
|
92
|
+
overwrite: true
|
|
93
|
+
});
|
|
94
|
+
addProjectTag(project, ProjectTagConstants.DistStyle.TAG_ID, ProjectTagConstants.DistStyle.CLEAN, {
|
|
95
|
+
overwrite: true
|
|
96
|
+
});
|
|
97
|
+
addProjectTag(project, ProjectTagConstants.Provider.TAG_ID, "cloudflare", {
|
|
98
|
+
overwrite: true
|
|
99
|
+
});
|
|
100
|
+
return project?.name ? {
|
|
101
|
+
projects: {
|
|
102
|
+
[project.name]: {
|
|
103
|
+
...project,
|
|
104
|
+
targets,
|
|
105
|
+
release: {
|
|
106
|
+
...project?.release,
|
|
107
|
+
version: {
|
|
108
|
+
...project?.release?.version,
|
|
109
|
+
generator: "@storm-software/workspace-tools:release-version"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} : {};
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, packageJson) {
|
|
118
|
+
const { nx, name: name2 } = packageJson;
|
|
119
|
+
const root = dirname(projectJsonPath);
|
|
120
|
+
return {
|
|
121
|
+
...nx,
|
|
122
|
+
name: name2,
|
|
123
|
+
root,
|
|
124
|
+
targets: {}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
__name(createProjectFromPackageJsonNextToProjectJson, "createProjectFromPackageJsonNextToProjectJson");
|
|
128
|
+
function createPackageJson(projectJsonPath, workspaceRoot) {
|
|
129
|
+
try {
|
|
130
|
+
const root = dirname(projectJsonPath);
|
|
131
|
+
const packageJsonPath = join(workspaceRoot, root, "package.json");
|
|
132
|
+
if (!existsSync(packageJsonPath)) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
return readJsonFile(packageJsonPath);
|
|
136
|
+
} catch (e) {
|
|
137
|
+
console.log(e);
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
__name(createPackageJson, "createPackageJson");
|
|
142
|
+
export {
|
|
143
|
+
applicationGenerator,
|
|
144
|
+
applicationSchematic,
|
|
145
|
+
createNodes,
|
|
146
|
+
getInternalDependencies,
|
|
147
|
+
initGenerator,
|
|
148
|
+
initSchematic,
|
|
149
|
+
name,
|
|
150
|
+
r2UploadFile
|
|
151
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface CloudflarePublishExecutorSchema {
|
|
2
|
+
name: string;
|
|
3
|
+
noBundle: boolean;
|
|
4
|
+
env: string;
|
|
5
|
+
outdir: string;
|
|
6
|
+
compatibilityDate: string;
|
|
7
|
+
compatibilityFlags: string[];
|
|
8
|
+
latest: boolean;
|
|
9
|
+
assets: string;
|
|
10
|
+
site: string;
|
|
11
|
+
siteInclude: string[];
|
|
12
|
+
siteExclude: string[];
|
|
13
|
+
var: string[];
|
|
14
|
+
define: string[];
|
|
15
|
+
triggers: string[];
|
|
16
|
+
routes: string[];
|
|
17
|
+
tsConfig: string;
|
|
18
|
+
minify: boolean;
|
|
19
|
+
nodeCompat: boolean;
|
|
20
|
+
dryRun: boolean;
|
|
21
|
+
keepVars: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type { CloudflarePublishExecutorSchema as C };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface CloudflarePublishExecutorSchema {
|
|
2
|
+
name: string;
|
|
3
|
+
noBundle: boolean;
|
|
4
|
+
env: string;
|
|
5
|
+
outdir: string;
|
|
6
|
+
compatibilityDate: string;
|
|
7
|
+
compatibilityFlags: string[];
|
|
8
|
+
latest: boolean;
|
|
9
|
+
assets: string;
|
|
10
|
+
site: string;
|
|
11
|
+
siteInclude: string[];
|
|
12
|
+
siteExclude: string[];
|
|
13
|
+
var: string[];
|
|
14
|
+
define: string[];
|
|
15
|
+
triggers: string[];
|
|
16
|
+
routes: string[];
|
|
17
|
+
tsConfig: string;
|
|
18
|
+
minify: boolean;
|
|
19
|
+
nodeCompat: boolean;
|
|
20
|
+
dryRun: boolean;
|
|
21
|
+
keepVars: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type { CloudflarePublishExecutorSchema as C };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { C as CloudflarePublishExecutorSchema } from '../../../schema.d-DgA16PUG.mjs';
|
|
3
|
+
|
|
4
|
+
declare function runExecutor(options: CloudflarePublishExecutorSchema, context: ExecutorContext): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
|
|
8
|
+
export { runExecutor as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { C as CloudflarePublishExecutorSchema } from '../../../schema.d-DgA16PUG.js';
|
|
3
|
+
|
|
4
|
+
declare function runExecutor(options: CloudflarePublishExecutorSchema, context: ExecutorContext): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
|
|
8
|
+
export { runExecutor as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkR7AIVBS7js = require('../../../chunk-R7AIVBS7.js');
|
|
4
|
+
require('../../../chunk-Z46UO4N7.js');
|
|
5
|
+
require('../../../chunk-VTHBMY4B.js');
|
|
6
|
+
require('../../../chunk-YE4FHRXJ.js');
|
|
7
|
+
require('../../../chunk-RCE3CC76.js');
|
|
8
|
+
require('../../../chunk-J5SB6L2L.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.default = _chunkR7AIVBS7js.runExecutor;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runExecutor
|
|
3
|
+
} from "../../../chunk-QEWY5YJA.mjs";
|
|
4
|
+
import "../../../chunk-OJNZ4PXQ.mjs";
|
|
5
|
+
import "../../../chunk-XU6MTFCV.mjs";
|
|
6
|
+
import "../../../chunk-OARYMVO7.mjs";
|
|
7
|
+
import "../../../chunk-NSLK6ZDO.mjs";
|
|
8
|
+
import "../../../chunk-A7FFSBE6.mjs";
|
|
9
|
+
export {
|
|
10
|
+
runExecutor as default
|
|
11
|
+
};
|