@bleedingdev/modern-js-app-tools 3.2.0-ultramodern.31 → 3.2.0-ultramodern.36
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.
|
@@ -55,6 +55,10 @@ const getWorkerName = (appDirectory)=>{
|
|
|
55
55
|
const basename = external_node_path_default().basename(appDirectory);
|
|
56
56
|
return basename.replace(/[^a-zA-Z0-9-_]/g, '-') || 'modern-cloudflare-worker';
|
|
57
57
|
};
|
|
58
|
+
const getConfiguredWorkerName = (appDirectory, modernConfig)=>{
|
|
59
|
+
const configuredName = modernConfig.deploy?.worker?.name?.trim();
|
|
60
|
+
return configuredName || getWorkerName(appDirectory);
|
|
61
|
+
};
|
|
58
62
|
const readRouteSpec = async (outputDirectory)=>{
|
|
59
63
|
const routeSpecPath = external_node_path_default().join(outputDirectory, ROUTE_SPEC_OUTPUT);
|
|
60
64
|
if (!await utils_namespaceObject.fs.pathExists(routeSpecPath)) return {
|
|
@@ -159,6 +163,7 @@ const createCloudflarePreset = ({ appContext, modernConfig })=>{
|
|
|
159
163
|
const workerManifestPath = external_node_path_default().join(outputDirectory, WORKER_MANIFEST);
|
|
160
164
|
const routeSpecOutputPath = external_node_path_default().join(outputDirectory, ROUTE_SPEC_OUTPUT);
|
|
161
165
|
const wranglerConfigPath = external_node_path_default().join(outputDirectory, 'wrangler.json');
|
|
166
|
+
const workerName = getConfiguredWorkerName(appDirectory, modernConfig);
|
|
162
167
|
return {
|
|
163
168
|
async prepare () {
|
|
164
169
|
await utils_namespaceObject.fs.remove(outputDirectory);
|
|
@@ -177,7 +182,7 @@ const createCloudflarePreset = ({ appContext, modernConfig })=>{
|
|
|
177
182
|
});
|
|
178
183
|
await utils_namespaceObject.fs.writeJSON(wranglerConfigPath, {
|
|
179
184
|
$schema: 'node_modules/wrangler/config-schema.json',
|
|
180
|
-
name:
|
|
185
|
+
name: workerName,
|
|
181
186
|
main: WORKER_ENTRY,
|
|
182
187
|
compatibility_date: getCompatibilityDate(),
|
|
183
188
|
compatibility_flags: [
|
|
@@ -17,6 +17,10 @@ const getWorkerName = (appDirectory)=>{
|
|
|
17
17
|
const basename = node_path.basename(appDirectory);
|
|
18
18
|
return basename.replace(/[^a-zA-Z0-9-_]/g, '-') || 'modern-cloudflare-worker';
|
|
19
19
|
};
|
|
20
|
+
const getConfiguredWorkerName = (appDirectory, modernConfig)=>{
|
|
21
|
+
const configuredName = modernConfig.deploy?.worker?.name?.trim();
|
|
22
|
+
return configuredName || getWorkerName(appDirectory);
|
|
23
|
+
};
|
|
20
24
|
const readRouteSpec = async (outputDirectory)=>{
|
|
21
25
|
const routeSpecPath = node_path.join(outputDirectory, ROUTE_SPEC_OUTPUT);
|
|
22
26
|
if (!await fs.pathExists(routeSpecPath)) return {
|
|
@@ -121,6 +125,7 @@ const createCloudflarePreset = ({ appContext, modernConfig })=>{
|
|
|
121
125
|
const workerManifestPath = node_path.join(outputDirectory, WORKER_MANIFEST);
|
|
122
126
|
const routeSpecOutputPath = node_path.join(outputDirectory, ROUTE_SPEC_OUTPUT);
|
|
123
127
|
const wranglerConfigPath = node_path.join(outputDirectory, 'wrangler.json');
|
|
128
|
+
const workerName = getConfiguredWorkerName(appDirectory, modernConfig);
|
|
124
129
|
return {
|
|
125
130
|
async prepare () {
|
|
126
131
|
await fs.remove(outputDirectory);
|
|
@@ -139,7 +144,7 @@ const createCloudflarePreset = ({ appContext, modernConfig })=>{
|
|
|
139
144
|
});
|
|
140
145
|
await fs.writeJSON(wranglerConfigPath, {
|
|
141
146
|
$schema: 'node_modules/wrangler/config-schema.json',
|
|
142
|
-
name:
|
|
147
|
+
name: workerName,
|
|
143
148
|
main: WORKER_ENTRY,
|
|
144
149
|
compatibility_date: getCompatibilityDate(),
|
|
145
150
|
compatibility_flags: [
|
|
@@ -18,6 +18,10 @@ const getWorkerName = (appDirectory)=>{
|
|
|
18
18
|
const basename = node_path.basename(appDirectory);
|
|
19
19
|
return basename.replace(/[^a-zA-Z0-9-_]/g, '-') || 'modern-cloudflare-worker';
|
|
20
20
|
};
|
|
21
|
+
const getConfiguredWorkerName = (appDirectory, modernConfig)=>{
|
|
22
|
+
const configuredName = modernConfig.deploy?.worker?.name?.trim();
|
|
23
|
+
return configuredName || getWorkerName(appDirectory);
|
|
24
|
+
};
|
|
21
25
|
const readRouteSpec = async (outputDirectory)=>{
|
|
22
26
|
const routeSpecPath = node_path.join(outputDirectory, ROUTE_SPEC_OUTPUT);
|
|
23
27
|
if (!await fs.pathExists(routeSpecPath)) return {
|
|
@@ -122,6 +126,7 @@ const createCloudflarePreset = ({ appContext, modernConfig })=>{
|
|
|
122
126
|
const workerManifestPath = node_path.join(outputDirectory, WORKER_MANIFEST);
|
|
123
127
|
const routeSpecOutputPath = node_path.join(outputDirectory, ROUTE_SPEC_OUTPUT);
|
|
124
128
|
const wranglerConfigPath = node_path.join(outputDirectory, 'wrangler.json');
|
|
129
|
+
const workerName = getConfiguredWorkerName(appDirectory, modernConfig);
|
|
125
130
|
return {
|
|
126
131
|
async prepare () {
|
|
127
132
|
await fs.remove(outputDirectory);
|
|
@@ -140,7 +145,7 @@ const createCloudflarePreset = ({ appContext, modernConfig })=>{
|
|
|
140
145
|
});
|
|
141
146
|
await fs.writeJSON(wranglerConfigPath, {
|
|
142
147
|
$schema: 'node_modules/wrangler/config-schema.json',
|
|
143
|
-
name:
|
|
148
|
+
name: workerName,
|
|
144
149
|
main: WORKER_ENTRY,
|
|
145
150
|
compatibility_date: getCompatibilityDate(),
|
|
146
151
|
compatibility_flags: [
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.2.0-ultramodern.
|
|
20
|
+
"version": "3.2.0-ultramodern.36",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"exports": {
|
|
@@ -98,16 +98,16 @@
|
|
|
98
98
|
"ndepe": "^0.1.13",
|
|
99
99
|
"pkg-types": "^2.3.1",
|
|
100
100
|
"std-env": "4.1.0",
|
|
101
|
-
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.2.0-ultramodern.
|
|
102
|
-
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.
|
|
103
|
-
"@modern-js/plugin
|
|
104
|
-
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.
|
|
105
|
-
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.2.0-ultramodern.
|
|
106
|
-
"@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.2.0-ultramodern.
|
|
107
|
-
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.2.0-ultramodern.
|
|
108
|
-
"@modern-js/
|
|
109
|
-
"@modern-js/
|
|
110
|
-
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.2.0-ultramodern.
|
|
101
|
+
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.2.0-ultramodern.36",
|
|
102
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.36",
|
|
103
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.36",
|
|
104
|
+
"@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.2.0-ultramodern.36",
|
|
105
|
+
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.2.0-ultramodern.36",
|
|
106
|
+
"@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.2.0-ultramodern.36",
|
|
107
|
+
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.2.0-ultramodern.36",
|
|
108
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.36",
|
|
109
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.36",
|
|
110
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.2.0-ultramodern.36"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@rslib/core": "0.21.5",
|