@cedarjs/api-server 1.0.0-canary.12778 → 1.0.0-canary.12780

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.
@@ -3,5 +3,5 @@
3
3
  * Watches for changes in the API source directory and rebuilds/restarts as
4
4
  * needed
5
5
  */
6
- export declare function startWatch(): void;
6
+ export declare function startWatch(): Promise<void>;
7
7
  //# sourceMappingURL=watch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/watch.ts"],"names":[],"mappings":"AAgFA;;;;GAIG;AACH,wBAAgB,UAAU,SAiEzB"}
1
+ {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/watch.ts"],"names":[],"mappings":"AAuEA;;;;GAIG;AACH,wBAAsB,UAAU,kBA6E/B"}
package/dist/cjs/watch.js CHANGED
@@ -251,30 +251,32 @@ async function validateSdls() {
251
251
  return false;
252
252
  }
253
253
  }
254
- var IGNORED_API_PATHS = [
255
- "api/dist",
256
- // use this, because using rwjsPaths.api.dist seems to not ignore on first build
257
- cedarPaths.api.types,
258
- cedarPaths.api.db
259
- ].map((path3) => (0, import_project_config2.ensurePosixPath)(path3));
260
- function startWatch() {
254
+ async function startWatch() {
255
+ const ignoredApiPaths = [
256
+ // use this, because using cedarPaths.api.dist seems to not ignore on first
257
+ // build
258
+ "api/dist",
259
+ cedarPaths.api.types,
260
+ cedarPaths.api.db
261
+ ].map((path3) => (0, import_project_config2.ensurePosixPath)(path3));
262
+ const ignoredExtensions = [
263
+ ".DS_Store",
264
+ ".db",
265
+ ".sqlite",
266
+ "-journal",
267
+ ".test.js",
268
+ ".test.ts",
269
+ ".scenarios.ts",
270
+ ".scenarios.js",
271
+ ".d.ts",
272
+ ".log"
273
+ ];
261
274
  const watcher = import_chokidar.default.watch([cedarPaths.api.src], {
262
275
  persistent: true,
263
276
  ignoreInitial: true,
264
277
  ignored: (file) => {
265
- const x = file.includes("node_modules") || IGNORED_API_PATHS.some((ignoredPath) => file.includes(ignoredPath)) || [
266
- ".DS_Store",
267
- ".db",
268
- ".sqlite",
269
- "-journal",
270
- ".test.js",
271
- ".test.ts",
272
- ".scenarios.ts",
273
- ".scenarios.js",
274
- ".d.ts",
275
- ".log"
276
- ].some((ext) => file.endsWith(ext));
277
- return x;
278
+ const shouldIgnore = file.includes("node_modules") || ignoredApiPaths.some((ignoredPath) => file.includes(ignoredPath)) || ignoredExtensions.some((ext) => file.endsWith(ext));
279
+ return shouldIgnore;
278
280
  }
279
281
  });
280
282
  watcher.on("ready", async () => {
package/dist/watch.d.ts CHANGED
@@ -3,5 +3,5 @@
3
3
  * Watches for changes in the API source directory and rebuilds/restarts as
4
4
  * needed
5
5
  */
6
- export declare function startWatch(): void;
6
+ export declare function startWatch(): Promise<void>;
7
7
  //# sourceMappingURL=watch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":"AAgFA;;;;GAIG;AACH,wBAAgB,UAAU,SAiEzB"}
1
+ {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":"AAuEA;;;;GAIG;AACH,wBAAsB,UAAU,kBA6E/B"}
package/dist/watch.js CHANGED
@@ -222,30 +222,32 @@ async function validateSdls() {
222
222
  return false;
223
223
  }
224
224
  }
225
- var IGNORED_API_PATHS = [
226
- "api/dist",
227
- // use this, because using rwjsPaths.api.dist seems to not ignore on first build
228
- cedarPaths.api.types,
229
- cedarPaths.api.db
230
- ].map((path3) => ensurePosixPath(path3));
231
- function startWatch() {
225
+ async function startWatch() {
226
+ const ignoredApiPaths = [
227
+ // use this, because using cedarPaths.api.dist seems to not ignore on first
228
+ // build
229
+ "api/dist",
230
+ cedarPaths.api.types,
231
+ cedarPaths.api.db
232
+ ].map((path3) => ensurePosixPath(path3));
233
+ const ignoredExtensions = [
234
+ ".DS_Store",
235
+ ".db",
236
+ ".sqlite",
237
+ "-journal",
238
+ ".test.js",
239
+ ".test.ts",
240
+ ".scenarios.ts",
241
+ ".scenarios.js",
242
+ ".d.ts",
243
+ ".log"
244
+ ];
232
245
  const watcher = chokidar.watch([cedarPaths.api.src], {
233
246
  persistent: true,
234
247
  ignoreInitial: true,
235
248
  ignored: (file) => {
236
- const x = file.includes("node_modules") || IGNORED_API_PATHS.some((ignoredPath) => file.includes(ignoredPath)) || [
237
- ".DS_Store",
238
- ".db",
239
- ".sqlite",
240
- "-journal",
241
- ".test.js",
242
- ".test.ts",
243
- ".scenarios.ts",
244
- ".scenarios.js",
245
- ".d.ts",
246
- ".log"
247
- ].some((ext) => file.endsWith(ext));
248
- return x;
249
+ const shouldIgnore = file.includes("node_modules") || ignoredApiPaths.some((ignoredPath) => file.includes(ignoredPath)) || ignoredExtensions.some((ext) => file.endsWith(ext));
250
+ return shouldIgnore;
249
251
  }
250
252
  });
251
253
  watcher.on("ready", async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/api-server",
3
- "version": "1.0.0-canary.12778+4886cc893",
3
+ "version": "1.0.0-canary.12780+7f8401db4",
4
4
  "description": "CedarJS's HTTP server for Serverless Functions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -107,11 +107,11 @@
107
107
  "test:watch": "vitest watch"
108
108
  },
109
109
  "dependencies": {
110
- "@cedarjs/context": "1.0.0-canary.12778",
111
- "@cedarjs/fastify-web": "1.0.0-canary.12778",
112
- "@cedarjs/internal": "1.0.0-canary.12778",
113
- "@cedarjs/project-config": "1.0.0-canary.12778",
114
- "@cedarjs/web-server": "1.0.0-canary.12778",
110
+ "@cedarjs/context": "1.0.0-canary.12780",
111
+ "@cedarjs/fastify-web": "1.0.0-canary.12780",
112
+ "@cedarjs/internal": "1.0.0-canary.12780",
113
+ "@cedarjs/project-config": "1.0.0-canary.12780",
114
+ "@cedarjs/web-server": "1.0.0-canary.12780",
115
115
  "@fastify/multipart": "9.0.3",
116
116
  "@fastify/url-data": "6.0.3",
117
117
  "ansis": "4.1.0",
@@ -128,7 +128,7 @@
128
128
  "yargs": "17.7.2"
129
129
  },
130
130
  "devDependencies": {
131
- "@cedarjs/framework-tools": "1.0.0-canary.12778",
131
+ "@cedarjs/framework-tools": "1.0.0-canary.12780",
132
132
  "@types/aws-lambda": "8.10.152",
133
133
  "@types/dotenv-defaults": "^2.0.4",
134
134
  "@types/qs": "6.9.16",
@@ -141,7 +141,7 @@
141
141
  "vitest": "3.2.4"
142
142
  },
143
143
  "peerDependencies": {
144
- "@cedarjs/graphql-server": "1.0.0-canary.12778"
144
+ "@cedarjs/graphql-server": "1.0.0-canary.12780"
145
145
  },
146
146
  "peerDependenciesMeta": {
147
147
  "@cedarjs/graphql-server": {
@@ -151,5 +151,5 @@
151
151
  "publishConfig": {
152
152
  "access": "public"
153
153
  },
154
- "gitHead": "4886cc89337c009c174ee1ac77e5d751cc299f61"
154
+ "gitHead": "7f8401db41974dafa310f9b8dcbb355bb36fd24c"
155
155
  }