@codedazur/cdk-next-app 0.2.11 → 0.3.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @codedazur/cdk-next-app
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ddef1e0`](https://github.com/codedazur/toolkit/commit/ddef1e023538d35ecf637a30e654f10ebb06d8d2) Thanks [@thijsdaniels](https://github.com/thijsdaniels)! - Authentication is now disabled by default for the API route, even if authentication is prvided for the default behavior.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @codedazur/cdk-docker-cluster@0.9.2
13
+
14
+ ## 0.2.12
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`afec6fd`](https://github.com/codedazur/toolkit/commit/afec6fdb40cfbbb4dc118c2fa6caacf1345f7875)]:
19
+ - @codedazur/cdk-docker-cluster@0.9.1
20
+
3
21
  ## 0.2.11
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -22,6 +22,7 @@ declare class NextApp extends DockerCluster {
22
22
  file?: string;
23
23
  arguments?: Record<string, string>;
24
24
  };
25
+ protected static npmSecret(): string;
25
26
  }
26
27
 
27
28
  export { NextApp, type NextAppProps };
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ declare class NextApp extends DockerCluster {
22
22
  file?: string;
23
23
  arguments?: Record<string, string>;
24
24
  };
25
+ protected static npmSecret(): string;
25
26
  }
26
27
 
27
28
  export { NextApp, type NextAppProps };
package/dist/index.js CHANGED
@@ -46,12 +46,23 @@ var NextApp = class _NextApp extends import_cdk_docker_cluster.DockerCluster {
46
46
  service: { port = 3e3, ...service } = {},
47
47
  ...props
48
48
  }) {
49
+ var _a, _b, _c;
49
50
  super(scope, id, {
50
51
  source: _NextApp.withNpmSecret(source),
51
52
  service: {
52
53
  port,
53
54
  ...service
54
55
  },
56
+ distribution: {
57
+ ...props.distribution,
58
+ behaviors: {
59
+ ...(_a = props.distribution) == null ? void 0 : _a.behaviors,
60
+ "/api/*": {
61
+ authentication: false,
62
+ ...(_c = (_b = props.distribution) == null ? void 0 : _b.behaviors) == null ? void 0 : _c["/api/*"]
63
+ }
64
+ }
65
+ },
55
66
  ...props
56
67
  });
57
68
  }
@@ -63,18 +74,21 @@ var NextApp = class _NextApp extends import_cdk_docker_cluster.DockerCluster {
63
74
  return {
64
75
  directory: source,
65
76
  secrets: {
66
- npmrc: import_aws_cdk_lib.DockerBuildSecret.fromSrc(import_path.default.join(import_os.default.homedir(), "/.npmrc"))
77
+ npmrc: _NextApp.npmSecret()
67
78
  }
68
79
  };
69
80
  }
70
81
  return {
71
82
  ...source,
72
83
  secrets: {
73
- npmrc: import_aws_cdk_lib.DockerBuildSecret.fromSrc(import_path.default.join(import_os.default.homedir(), "/.npmrc")),
84
+ npmrc: _NextApp.npmSecret(),
74
85
  ...source.secrets
75
86
  }
76
87
  };
77
88
  }
89
+ static npmSecret() {
90
+ return import_aws_cdk_lib.DockerBuildSecret.fromSrc(import_path.default.join(import_os.default.homedir(), ".npmrc"));
91
+ }
78
92
  };
79
93
  // Annotate the CommonJS export names for ESM import in node:
80
94
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -12,12 +12,23 @@ var NextApp = class _NextApp extends DockerCluster {
12
12
  service: { port = 3e3, ...service } = {},
13
13
  ...props
14
14
  }) {
15
+ var _a, _b, _c;
15
16
  super(scope, id, {
16
17
  source: _NextApp.withNpmSecret(source),
17
18
  service: {
18
19
  port,
19
20
  ...service
20
21
  },
22
+ distribution: {
23
+ ...props.distribution,
24
+ behaviors: {
25
+ ...(_a = props.distribution) == null ? void 0 : _a.behaviors,
26
+ "/api/*": {
27
+ authentication: false,
28
+ ...(_c = (_b = props.distribution) == null ? void 0 : _b.behaviors) == null ? void 0 : _c["/api/*"]
29
+ }
30
+ }
31
+ },
21
32
  ...props
22
33
  });
23
34
  }
@@ -29,18 +40,21 @@ var NextApp = class _NextApp extends DockerCluster {
29
40
  return {
30
41
  directory: source,
31
42
  secrets: {
32
- npmrc: DockerBuildSecret.fromSrc(path.join(os.homedir(), "/.npmrc"))
43
+ npmrc: _NextApp.npmSecret()
33
44
  }
34
45
  };
35
46
  }
36
47
  return {
37
48
  ...source,
38
49
  secrets: {
39
- npmrc: DockerBuildSecret.fromSrc(path.join(os.homedir(), "/.npmrc")),
50
+ npmrc: _NextApp.npmSecret(),
40
51
  ...source.secrets
41
52
  }
42
53
  };
43
54
  }
55
+ static npmSecret() {
56
+ return DockerBuildSecret.fromSrc(path.join(os.homedir(), ".npmrc"));
57
+ }
44
58
  };
45
59
  export {
46
60
  NextApp
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codedazur/cdk-next-app",
3
- "version": "0.2.11",
3
+ "version": "0.3.0",
4
4
  "main": ".dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "scripts": {
18
18
  "develop": "tsup src/index.ts --format esm,cjs --dts --watch",
19
19
  "build": "tsup src/index.ts --format esm,cjs --dts",
20
- "audit": "npm audit --omit dev",
20
+ "audit": "npm audit --omit dev --audit-level high",
21
21
  "lint": "TIMING=1 eslint \"**/*.ts*\"",
22
22
  "types": "tsc --noEmit",
23
23
  "test": "vitest run --passWithNoTests"
@@ -27,12 +27,12 @@
27
27
  "constructs": ">=10"
28
28
  },
29
29
  "dependencies": {
30
- "@codedazur/cdk-docker-cluster": "^0.9.0"
30
+ "@codedazur/cdk-docker-cluster": "^0.9.2"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/node": "^20.14.9",
34
- "aws-cdk-lib": "^2.147.2",
33
+ "@types/node": "^20.14.10",
34
+ "aws-cdk-lib": "^2.149.0",
35
35
  "constructs": "^10.3.0",
36
- "esbuild": "^0.21.5"
36
+ "esbuild": "^0.23.0"
37
37
  }
38
38
  }