@cedarjs/api-server 1.0.0-canary.12501 → 1.0.0-canary.12502

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.
@@ -1,5 +1,5 @@
1
1
  import type { Argv } from 'yargs';
2
- import type { APIParsedOptions } from './types';
2
+ import type { APIParsedOptions } from './types.js';
3
3
  export declare const description = "Start a server for serving the api side";
4
4
  export declare function builder(yargs: Argv<APIParsedOptions>): void;
5
5
  export declare function handler(options: APIParsedOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"apiCLIConfig.d.ts","sourceRoot":"","sources":["../src/apiCLIConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,eAAO,MAAM,WAAW,4CAA4C,CAAA;AAEpE,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAyBpD;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,gBAAgB,iBAGtD"}
1
+ {"version":3,"file":"apiCLIConfig.d.ts","sourceRoot":"","sources":["../src/apiCLIConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,eAAO,MAAM,WAAW,4CAA4C,CAAA;AAEpE,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,QA0BpD;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,gBAAgB,iBAGtD"}
@@ -1,3 +1,3 @@
1
- import type { APIParsedOptions } from './types';
1
+ import type { APIParsedOptions } from './types.js';
2
2
  export declare function handler(options?: APIParsedOptions): Promise<void>;
3
3
  //# sourceMappingURL=apiCLIConfigHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apiCLIConfigHandler.d.ts","sourceRoot":"","sources":["../src/apiCLIConfigHandler.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,wBAAsB,OAAO,CAAC,OAAO,GAAE,gBAAqB,iBAoC3D"}
1
+ {"version":3,"file":"apiCLIConfigHandler.d.ts","sourceRoot":"","sources":["../src/apiCLIConfigHandler.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,wBAAsB,OAAO,CAAC,OAAO,GAAE,gBAAqB,iBAoC3D"}
@@ -33,7 +33,7 @@ __export(apiCLIConfigHandler_exports, {
33
33
  module.exports = __toCommonJS(apiCLIConfigHandler_exports);
34
34
  var import_ansis = __toESM(require("ansis"));
35
35
  var import_fastify_web = require("@cedarjs/fastify-web");
36
- var import_createServer = require("./createServer");
36
+ var import_createServer = require("./createServer.js");
37
37
  async function handler(options = {}) {
38
38
  const timeStart = Date.now();
39
39
  console.log(import_ansis.default.dim.italic("Starting API Server..."));
@@ -1,5 +1,5 @@
1
1
  import type { Argv } from 'yargs';
2
- import type { BothParsedOptions } from './types';
2
+ import type { BothParsedOptions } from './types.js';
3
3
  export declare const description = "Start a server for serving the api and web sides";
4
4
  export declare function builder(yargs: Argv<BothParsedOptions>): void;
5
5
  export declare function handler(options: BothParsedOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"bothCLIConfig.d.ts","sourceRoot":"","sources":["../src/bothCLIConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,eAAO,MAAM,WAAW,qDAAqD,CAAA;AAE7E,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,QA+BrD;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,iBAAiB,iBAGvD"}
1
+ {"version":3,"file":"bothCLIConfig.d.ts","sourceRoot":"","sources":["../src/bothCLIConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,eAAO,MAAM,WAAW,qDAAqD,CAAA;AAE7E,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,QA+BrD;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,iBAAiB,iBAGvD"}
@@ -1,3 +1,3 @@
1
- import type { BothParsedOptions } from './types';
1
+ import type { BothParsedOptions } from './types.js';
2
2
  export declare function handler(options: BothParsedOptions): Promise<void>;
3
3
  //# sourceMappingURL=bothCLIConfigHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bothCLIConfigHandler.d.ts","sourceRoot":"","sources":["../src/bothCLIConfigHandler.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,wBAAsB,OAAO,CAAC,OAAO,EAAE,iBAAiB,iBAmEvD"}
1
+ {"version":3,"file":"bothCLIConfigHandler.d.ts","sourceRoot":"","sources":["../src/bothCLIConfigHandler.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,wBAAsB,OAAO,CAAC,OAAO,EAAE,iBAAiB,iBAmEvD"}
@@ -33,9 +33,9 @@ __export(bothCLIConfigHandler_exports, {
33
33
  module.exports = __toCommonJS(bothCLIConfigHandler_exports);
34
34
  var import_ansis = __toESM(require("ansis"));
35
35
  var import_fastify_web = require("@cedarjs/fastify-web");
36
- var import_cliHelpers = require("./cliHelpers");
37
- var import_createServer = require("./createServer");
38
- var import_fastify = __toESM(require("./fastify"));
36
+ var import_cliHelpers = require("./cliHelpers.js");
37
+ var import_createServer = require("./createServer.js");
38
+ var import_fastify = __toESM(require("./fastify.js"));
39
39
  async function handler(options) {
40
40
  const timeStart = Date.now();
41
41
  console.log(import_ansis.default.dim.italic("Starting API and Web Servers..."));
@@ -1,4 +1,4 @@
1
- import type { CreateServerOptions, Server } from './createServerHelpers';
1
+ import type { CreateServerOptions, Server } from './createServerHelpers.js';
2
2
  /**
3
3
  * Creates a server for api functions:
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"createServer.d.ts","sourceRoot":"","sources":["../src/createServer.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,mBAAmB,EACnB,MAAM,EAEP,MAAM,uBAAuB,CAAA;AAqB9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,YAAY,CAAC,OAAO,GAAE,mBAAwB,mBAoHnE"}
1
+ {"version":3,"file":"createServer.d.ts","sourceRoot":"","sources":["../src/createServer.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,mBAAmB,EACnB,MAAM,EAEP,MAAM,0BAA0B,CAAA;AAqBjC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,YAAY,CAAC,OAAO,GAAE,mBAAwB,mBAoHnE"}
@@ -39,8 +39,8 @@ var import_fast_glob = __toESM(require("fast-glob"));
39
39
  var import_fastify = __toESM(require("fastify"));
40
40
  var import_store = require("@cedarjs/context/dist/store");
41
41
  var import_project_config = require("@cedarjs/project-config");
42
- var import_createServerHelpers = require("./createServerHelpers");
43
- var import_api = require("./plugins/api");
42
+ var import_createServerHelpers = require("./createServerHelpers.js");
43
+ var import_api = require("./plugins/api.js");
44
44
  if (!process.env.REDWOOD_ENV_FILES_LOADED) {
45
45
  (0, import_dotenv_defaults.config)({
46
46
  path: import_path.default.join((0, import_project_config.getPaths)().base, ".env"),
@@ -24,7 +24,7 @@ __export(createServerHelpers_exports, {
24
24
  module.exports = __toCommonJS(createServerHelpers_exports);
25
25
  var import_util = require("util");
26
26
  var import_helpers = require("@cedarjs/fastify-web/dist/helpers");
27
- var import_cliHelpers = require("./cliHelpers");
27
+ var import_cliHelpers = require("./cliHelpers.js");
28
28
  const getDefaultCreateServerOptions = () => ({
29
29
  apiRootPath: "/",
30
30
  logger: {
package/dist/fastify.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { FastifyInstance, FastifyServerOptions } from 'fastify';
2
- import type { FastifySideConfigFn } from './types';
2
+ import type { FastifySideConfigFn } from './types.js';
3
3
  export declare const DEFAULT_OPTIONS: {
4
4
  logger: {
5
5
  level: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../src/fastify.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAOpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD,eAAO,MAAM,eAAe;;;;CAI3B,CAAA;AAiBD,wBAAsB,iBAAiB;YAb7B,oBAAoB;sBACV,mBAAmB;GAsCtC;AAED,eAAO,MAAM,qBAAqB,aACtB,oBAAoB,KAC7B,OAAO,CAAC,eAAe,CAWzB,CAAA;AAED,eAAe,qBAAqB,CAAA"}
1
+ {"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../src/fastify.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAOpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAGrD,eAAO,MAAM,eAAe;;;;CAI3B,CAAA;AAiBD,wBAAsB,iBAAiB;YAb7B,oBAAoB;sBACV,mBAAmB;GAsCtC;AAED,eAAO,MAAM,qBAAqB,aACtB,oBAAoB,KAC7B,OAAO,CAAC,eAAe,CAWzB,CAAA;AAED,eAAe,qBAAqB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { Options as FastGlobOptions } from 'fast-glob';
2
2
  import type { FastifyInstance } from 'fastify';
3
- import type { Server } from '../createServerHelpers';
3
+ import type { Server } from '../createServerHelpers.js';
4
4
  export interface RedwoodFastifyAPIOptions {
5
5
  redwood: {
6
6
  apiRootPath?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/plugins/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAO9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAKpD,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,eAAe,CAAC,EAAE,eAAe,CAAA;QACjC,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;QACzC,cAAc,CAAC,EAAE,OAAO,CAAA;QACxB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;KAC3D,CAAA;CACF;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,wBAAwB,iBA4C/B"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/plugins/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAO9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAKvD,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,eAAe,CAAC,EAAE,eAAe,CAAA;QACjC,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;QACzC,cAAc,CAAC,EAAE,OAAO,CAAA;QACxB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;KAC3D,CAAA;CACF;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,wBAAwB,iBA4C/B"}
@@ -35,8 +35,8 @@ var import_url_data = __toESM(require("@fastify/url-data"));
35
35
  var import_fastify_raw_body = __toESM(require("fastify-raw-body"));
36
36
  var import_store = require("@cedarjs/context/dist/store");
37
37
  var import_helpers = require("@cedarjs/fastify-web/dist/helpers");
38
- var import_fastify = require("../fastify");
39
- var import_lambdaLoader = require("./lambdaLoader");
38
+ var import_fastify = require("../fastify.js");
39
+ var import_lambdaLoader = require("./lambdaLoader.js");
40
40
  async function redwoodFastifyAPI(fastify, opts) {
41
41
  const redwoodOptions = opts.redwood ?? {};
42
42
  redwoodOptions.apiRootPath ??= "/";
@@ -38,7 +38,7 @@ var import_store = require("@cedarjs/context/dist/store");
38
38
  var import_helpers = require("@cedarjs/fastify-web/dist/helpers");
39
39
  var import_graphql_server = require("@cedarjs/graphql-server");
40
40
  var import_project_config = require("@cedarjs/project-config");
41
- var import_awsLambdaFastify = require("../requestHandlers/awsLambdaFastify");
41
+ var import_awsLambdaFastify = require("../requestHandlers/awsLambdaFastify.js");
42
42
  async function redwoodFastifyGraphQLServer(fastify, options) {
43
43
  const redwoodOptions = options.redwood ?? {};
44
44
  redwoodOptions.apiRootPath ??= "/";
@@ -39,7 +39,7 @@ var import_ansis = __toESM(require("ansis"));
39
39
  var import_fast_glob = __toESM(require("fast-glob"));
40
40
  var import_lodash = require("lodash");
41
41
  var import_project_config = require("@cedarjs/project-config");
42
- var import_awsLambdaFastify = require("../requestHandlers/awsLambdaFastify");
42
+ var import_awsLambdaFastify = require("../requestHandlers/awsLambdaFastify.js");
43
43
  const LAMBDA_FUNCTIONS = {};
44
44
  const setLambdaFunctions = async (foundFunctions) => {
45
45
  const tsImport = Date.now();
@@ -33,7 +33,7 @@ __export(awsLambdaFastify_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(awsLambdaFastify_exports);
35
35
  var import_qs = __toESM(require("qs"));
36
- var import_utils = require("./utils");
36
+ var import_utils = require("./utils.js");
37
37
  const lambdaEventForFastifyRequest = (request) => {
38
38
  return {
39
39
  httpMethod: request.method,
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { FastifyInstance } from 'fastify';
2
- import type { RedwoodFastifyAPIOptions } from './plugins/api';
2
+ import type { RedwoodFastifyAPIOptions } from './plugins/api.js';
3
3
  export type FastifySideConfigFnOptions = {
4
4
  side: 'api' | 'web';
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAG7D,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,KAAK,GAAG,KAAK,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,0BAA0B,GAClC,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC,KACvD,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAA;AAEpC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,GAAG,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC,CAAA;AAEhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE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-1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/api-server",
3
- "version": "1.0.0-canary.12501+846d97dff",
3
+ "version": "1.0.0-canary.12502+85b82d045",
4
4
  "description": "CedarJS's HTTP server for Serverless Functions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,11 +29,11 @@
29
29
  "test:watch": "vitest watch"
30
30
  },
31
31
  "dependencies": {
32
- "@cedarjs/context": "1.0.0-canary.12501",
33
- "@cedarjs/fastify-web": "1.0.0-canary.12501",
34
- "@cedarjs/internal": "1.0.0-canary.12501",
35
- "@cedarjs/project-config": "1.0.0-canary.12501",
36
- "@cedarjs/web-server": "1.0.0-canary.12501",
32
+ "@cedarjs/context": "1.0.0-canary.12502",
33
+ "@cedarjs/fastify-web": "1.0.0-canary.12502",
34
+ "@cedarjs/internal": "1.0.0-canary.12502",
35
+ "@cedarjs/project-config": "1.0.0-canary.12502",
36
+ "@cedarjs/web-server": "1.0.0-canary.12502",
37
37
  "@fastify/multipart": "9.0.3",
38
38
  "@fastify/url-data": "6.0.3",
39
39
  "ansis": "4.1.0",
@@ -51,7 +51,7 @@
51
51
  "yargs": "17.7.2"
52
52
  },
53
53
  "devDependencies": {
54
- "@cedarjs/framework-tools": "1.0.0-canary.12501",
54
+ "@cedarjs/framework-tools": "1.0.0-canary.12502",
55
55
  "@types/aws-lambda": "8.10.152",
56
56
  "@types/lodash": "4.17.20",
57
57
  "@types/qs": "6.9.16",
@@ -64,12 +64,12 @@
64
64
  "vitest": "3.2.4"
65
65
  },
66
66
  "peerDependencies": {
67
- "@cedarjs/graphql-server": "1.0.0-canary.12501"
67
+ "@cedarjs/graphql-server": "1.0.0-canary.12502"
68
68
  },
69
69
  "peerDependenciesMeta": {
70
70
  "@cedarjs/graphql-server": {
71
71
  "optional": true
72
72
  }
73
73
  },
74
- "gitHead": "846d97dffb682fc420cbd599820c9dc026bb0b9f"
74
+ "gitHead": "85b82d04523961d5a45fba0bda258858a0f619b0"
75
75
  }