@pulumix/core 0.11.0 → 0.13.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/dist/dev/dev-pod.d.ts +11 -0
- package/dist/dev/dev-pod.d.ts.map +1 -0
- package/dist/dev/dev-pod.js +252 -0
- package/dist/dev/dev-pod.js.map +1 -0
- package/dist/dev/index.d.ts +4 -4
- package/dist/dev/index.d.ts.map +1 -1
- package/dist/dev/index.js +64 -108
- package/dist/dev/index.js.map +1 -1
- package/dist/dev/port-forward.js +1 -1
- package/dist/dev/port-forward.js.map +1 -1
- package/dist/dev/types.d.ts +12 -13
- package/dist/dev/types.d.ts.map +1 -1
- package/dist/dev/types.js +0 -2
- package/dist/dev/types.js.map +1 -1
- package/dist/docker.d.ts +1 -0
- package/dist/docker.d.ts.map +1 -1
- package/dist/docker.js +20 -0
- package/dist/docker.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/k8s/client.d.ts.map +1 -1
- package/dist/k8s/client.js +1 -34
- package/dist/k8s/client.js.map +1 -1
- package/dist/k8s/index.d.ts +2 -2
- package/dist/k8s/index.d.ts.map +1 -1
- package/dist/k8s/index.js +6 -1
- package/dist/k8s/index.js.map +1 -1
- package/dist/k8s/inspect.d.ts +25 -0
- package/dist/k8s/inspect.d.ts.map +1 -1
- package/dist/k8s/inspect.js +181 -0
- package/dist/k8s/inspect.js.map +1 -1
- package/dist/orchestrator/index.d.ts.map +1 -1
- package/dist/orchestrator/index.js +34 -79
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/types/manifest.d.ts +0 -74
- package/dist/types/manifest.d.ts.map +1 -1
- package/dist/types/service.d.ts +1 -5
- package/dist/types/service.d.ts.map +1 -1
- package/dist/validation/create-validator.d.ts +8 -0
- package/dist/validation/create-validator.d.ts.map +1 -0
- package/dist/validation/create-validator.js +122 -0
- package/dist/validation/create-validator.js.map +1 -0
- package/dist/validation/manifest.d.ts +4 -4
- package/dist/validation/manifest.d.ts.map +1 -1
- package/dist/validation/manifest.js +5 -111
- package/dist/validation/manifest.js.map +1 -1
- package/dist/validation/project.d.ts +4 -4
- package/dist/validation/project.d.ts.map +1 -1
- package/dist/validation/project.js +5 -102
- package/dist/validation/project.js.map +1 -1
- package/package.json +1 -1
- package/src/schemas/service-manifest.schema.json +9 -282
- package/dist/dev/env-builder.d.ts +0 -9
- package/dist/dev/env-builder.d.ts.map +0 -1
- package/dist/dev/env-builder.js +0 -67
- package/dist/dev/env-builder.js.map +0 -1
- package/dist/dev/env-compute.d.ts +0 -15
- package/dist/dev/env-compute.d.ts.map +0 -1
- package/dist/dev/env-compute.js +0 -92
- package/dist/dev/env-compute.js.map +0 -1
- package/dist/dev/local-runner.d.ts +0 -14
- package/dist/dev/local-runner.d.ts.map +0 -1
- package/dist/dev/local-runner.js +0 -175
- package/dist/dev/local-runner.js.map +0 -1
- package/dist/dev/service-swap.d.ts +0 -27
- package/dist/dev/service-swap.d.ts.map +0 -1
- package/dist/dev/service-swap.js +0 -272
- package/dist/dev/service-swap.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/validation/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/validation/manifest.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AA6B9C,eAAO,MAAM,uBAAuB,EAAE,CACpC,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,MAAM,KACf,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAsB,CAAA;AAsBtE,eAAO,MAAM,8BAA8B,EAAE,CAC3C,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,MAAM,KACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAA6B,CAAA"}
|
|
@@ -1,114 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.validateServiceManifest =
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const path = __importStar(require("path"));
|
|
45
|
-
const errors_1 = require("../types/errors");
|
|
46
|
-
const Either_1 = require("purify-ts/Either");
|
|
47
|
-
let schemaPath = path.join(__dirname, '../schemas/service-manifest.schema.json');
|
|
48
|
-
if (!fs.existsSync(schemaPath)) {
|
|
49
|
-
schemaPath = path.join(__dirname, '../../src/schemas/service-manifest.schema.json');
|
|
50
|
-
}
|
|
51
|
-
const schema = JSON.parse(fs.readFileSync(schemaPath, 'utf-8'));
|
|
52
|
-
const ajv = new ajv_1.default({
|
|
53
|
-
allErrors: true,
|
|
54
|
-
verbose: true,
|
|
55
|
-
strict: false,
|
|
56
|
-
$data: true
|
|
57
|
-
});
|
|
58
|
-
(0, ajv_formats_1.default)(ajv);
|
|
59
|
-
const validateManifest = ajv.compile(schema);
|
|
60
|
-
function formatValidationErrors(errors) {
|
|
61
|
-
const messages = ['Service manifest validation failed:'];
|
|
62
|
-
for (const error of errors) {
|
|
63
|
-
const path = error.instancePath || 'root';
|
|
64
|
-
const field = path.replace(/^\//, '').replace(/\//g, '.');
|
|
65
|
-
switch (error.keyword) {
|
|
66
|
-
case 'required':
|
|
67
|
-
messages.push(` • Missing required field: ${error.params.missingProperty}`);
|
|
68
|
-
break;
|
|
69
|
-
case 'type':
|
|
70
|
-
messages.push(` • Field '${field}' should be ${error.params.type}`);
|
|
71
|
-
break;
|
|
72
|
-
case 'pattern':
|
|
73
|
-
messages.push(` • Field '${field}' does not match required pattern`);
|
|
74
|
-
if (field === 'metadata.name') {
|
|
75
|
-
messages.push(` Must be lowercase alphanumeric with hyphens: [a-z0-9-]+`);
|
|
76
|
-
}
|
|
77
|
-
if (field === 'metadata.version') {
|
|
78
|
-
messages.push(` Must be valid semver: 1.2.3 or 1.2.3-beta.1`);
|
|
79
|
-
}
|
|
80
|
-
break;
|
|
81
|
-
case 'format':
|
|
82
|
-
messages.push(` • Field '${field}' should be valid ${error.params.format}`);
|
|
83
|
-
break;
|
|
84
|
-
case 'additionalProperties':
|
|
85
|
-
messages.push(` • Unknown field: ${error.params.additionalProperty}`);
|
|
86
|
-
break;
|
|
87
|
-
case 'enum':
|
|
88
|
-
messages.push(` • Field '${field}' must be one of: ${error.params.allowedValues.join(', ')}`);
|
|
89
|
-
break;
|
|
90
|
-
case 'minimum':
|
|
91
|
-
case 'maximum':
|
|
92
|
-
messages.push(` • Field '${field}' is out of range`);
|
|
93
|
-
break;
|
|
94
|
-
default:
|
|
95
|
-
messages.push(` • Validation error at ${field}: ${error.message}`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return messages.join('\n');
|
|
99
|
-
}
|
|
100
|
-
function validateServiceManifest(manifest, configPath) {
|
|
101
|
-
const valid = validateManifest(manifest);
|
|
102
|
-
if (!valid && validateManifest.errors) {
|
|
103
|
-
const errorMessage = formatValidationErrors(validateManifest.errors);
|
|
104
|
-
return (0, Either_1.Left)((0, errors_1.createConfigError)('InvalidConfigFormat', errorMessage, undefined, undefined, { configPath, validationErrors: validateManifest.errors }));
|
|
105
|
-
}
|
|
106
|
-
return (0, Either_1.Right)(manifest);
|
|
107
|
-
}
|
|
108
|
-
function validateServiceManifestOrThrow(manifest, configPath) {
|
|
109
|
-
const result = validateServiceManifest(manifest, configPath);
|
|
110
|
-
if (result.isLeft()) {
|
|
111
|
-
throw result.extract();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
3
|
+
exports.validateServiceManifestOrThrow = exports.validateServiceManifest = void 0;
|
|
4
|
+
const create_validator_1 = require("./create-validator");
|
|
5
|
+
const validator = (0, create_validator_1.createValidator)('service-manifest.schema.json', 'Service manifest');
|
|
6
|
+
exports.validateServiceManifest = validator.validate;
|
|
7
|
+
exports.validateServiceManifestOrThrow = validator.validateOrThrow;
|
|
114
8
|
//# sourceMappingURL=manifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/validation/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/validation/manifest.ts"],"names":[],"mappings":";;;AASA,yDAAoD;AAKpD,MAAM,SAAS,GAAG,IAAA,kCAAe,EAC/B,8BAA8B,EAC9B,kBAAkB,CACnB,CAAA;AAuBY,QAAA,uBAAuB,GAGgB,SAAS,CAAC,QAAQ,CAAA;AAsBzD,QAAA,8BAA8B,GAGZ,SAAS,CAAC,eAAe,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DeployError } from '../types/errors';
|
|
2
|
-
import { Either } from 'purify-ts/Either';
|
|
1
|
+
import type { DeployError } from '../types/errors';
|
|
2
|
+
import type { Either } from 'purify-ts/Either';
|
|
3
3
|
import type { ProjectConfig } from '../types/manifest';
|
|
4
|
-
export declare
|
|
5
|
-
export declare
|
|
4
|
+
export declare const validateProjectConfig: (config: unknown, configPath: string) => Either<DeployError, ProjectConfig>;
|
|
5
|
+
export declare const validateProjectConfigOrThrow: (config: unknown, configPath: string) => ProjectConfig;
|
|
6
6
|
//# sourceMappingURL=project.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/validation/project.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/validation/project.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AA0BtD,eAAO,MAAM,qBAAqB,EAAE,CAClC,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,MAAM,KACf,MAAM,CAAC,WAAW,EAAE,aAAa,CAAsB,CAAA;AAS5D,eAAO,MAAM,4BAA4B,EAAE,CACzC,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,MAAM,KACf,aAAyC,CAAA"}
|
|
@@ -1,105 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.validateProjectConfig =
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const path = __importStar(require("path"));
|
|
45
|
-
const errors_1 = require("../types/errors");
|
|
46
|
-
const Either_1 = require("purify-ts/Either");
|
|
47
|
-
let schemaPath = path.join(__dirname, '../schemas/project-config.schema.json');
|
|
48
|
-
if (!fs.existsSync(schemaPath)) {
|
|
49
|
-
schemaPath = path.join(__dirname, '../../src/schemas/project-config.schema.json');
|
|
50
|
-
}
|
|
51
|
-
const schema = JSON.parse(fs.readFileSync(schemaPath, 'utf-8'));
|
|
52
|
-
const ajv = new ajv_1.default({
|
|
53
|
-
allErrors: true,
|
|
54
|
-
verbose: true,
|
|
55
|
-
strict: false,
|
|
56
|
-
$data: true
|
|
57
|
-
});
|
|
58
|
-
(0, ajv_formats_1.default)(ajv);
|
|
59
|
-
const validateConfig = ajv.compile(schema);
|
|
60
|
-
function formatValidationErrors(errors) {
|
|
61
|
-
const messages = ['Project configuration validation failed:'];
|
|
62
|
-
for (const error of errors) {
|
|
63
|
-
const path = error.instancePath || 'root';
|
|
64
|
-
const field = path.replace(/^\//, '').replace(/\//g, '.');
|
|
65
|
-
switch (error.keyword) {
|
|
66
|
-
case 'required':
|
|
67
|
-
messages.push(` - Missing required field: ${error.params.missingProperty}`);
|
|
68
|
-
break;
|
|
69
|
-
case 'type':
|
|
70
|
-
messages.push(` - Field '${field}' should be ${error.params.type}`);
|
|
71
|
-
break;
|
|
72
|
-
case 'enum':
|
|
73
|
-
messages.push(` - Field '${field}' must be one of: ${error.params.allowedValues.join(', ')}`);
|
|
74
|
-
break;
|
|
75
|
-
case 'const':
|
|
76
|
-
messages.push(` - Field '${field}' must be '${error.params.allowedValue}'`);
|
|
77
|
-
break;
|
|
78
|
-
case 'additionalProperties':
|
|
79
|
-
messages.push(` - Unknown field: ${field}.${error.params.additionalProperty}`);
|
|
80
|
-
break;
|
|
81
|
-
case 'oneOf':
|
|
82
|
-
messages.push(` - Field '${field}' does not match any valid backend type`);
|
|
83
|
-
break;
|
|
84
|
-
default:
|
|
85
|
-
messages.push(` - Validation error at ${field}: ${error.message}`);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return messages.join('\n');
|
|
89
|
-
}
|
|
90
|
-
function validateProjectConfig(config, configPath) {
|
|
91
|
-
const valid = validateConfig(config);
|
|
92
|
-
if (!valid && validateConfig.errors) {
|
|
93
|
-
const errorMessage = formatValidationErrors(validateConfig.errors);
|
|
94
|
-
return (0, Either_1.Left)((0, errors_1.createConfigError)('InvalidConfigFormat', errorMessage, undefined, undefined, { configPath, validationErrors: validateConfig.errors }));
|
|
95
|
-
}
|
|
96
|
-
return (0, Either_1.Right)(config);
|
|
97
|
-
}
|
|
98
|
-
function validateProjectConfigOrThrow(config, configPath) {
|
|
99
|
-
const result = validateProjectConfig(config, configPath);
|
|
100
|
-
if (result.isLeft()) {
|
|
101
|
-
throw result.extract();
|
|
102
|
-
}
|
|
103
|
-
return result.unsafeCoerce();
|
|
104
|
-
}
|
|
3
|
+
exports.validateProjectConfigOrThrow = exports.validateProjectConfig = void 0;
|
|
4
|
+
const create_validator_1 = require("./create-validator");
|
|
5
|
+
const validator = (0, create_validator_1.createValidator)('project-config.schema.json', 'Project configuration');
|
|
6
|
+
exports.validateProjectConfig = validator.validate;
|
|
7
|
+
exports.validateProjectConfigOrThrow = validator.validateOrThrow;
|
|
105
8
|
//# sourceMappingURL=project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/validation/project.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/validation/project.ts"],"names":[],"mappings":";;;AASA,yDAAoD;AAMpD,MAAM,SAAS,GAAG,IAAA,kCAAe,EAC/B,4BAA4B,EAC5B,uBAAuB,CACxB,CAAA;AAoBY,QAAA,qBAAqB,GAGQ,SAAS,CAAC,QAAQ,CAAA;AAS/C,QAAA,4BAA4B,GAGpB,SAAS,CAAC,eAAe,CAAA"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://pulumix.dev/schemas/service-manifest.json",
|
|
4
4
|
"title": "Pulumix Service Manifest",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Minimal manifest for Pulumix services",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["metadata", "stacks"],
|
|
8
8
|
"properties": {
|
|
@@ -19,295 +19,22 @@
|
|
|
19
19
|
"type": "string",
|
|
20
20
|
"description": "Service version (semver)",
|
|
21
21
|
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
22
|
-
},
|
|
23
|
-
"description": {
|
|
24
|
-
"type": "string",
|
|
25
|
-
"description": "Brief service description"
|
|
26
|
-
},
|
|
27
|
-
"team": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"description": "Owning team name"
|
|
30
|
-
},
|
|
31
|
-
"owner": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "Service owner email",
|
|
34
|
-
"format": "email"
|
|
35
|
-
},
|
|
36
|
-
"repository": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"description": "Source code repository URL",
|
|
39
|
-
"format": "uri"
|
|
40
|
-
},
|
|
41
|
-
"documentation": {
|
|
42
|
-
"type": "string",
|
|
43
|
-
"description": "Documentation URL",
|
|
44
|
-
"format": "uri"
|
|
45
|
-
},
|
|
46
|
-
"tags": {
|
|
47
|
-
"type": "object",
|
|
48
|
-
"description": "Custom tags for categorization",
|
|
49
|
-
"additionalProperties": {
|
|
50
|
-
"type": "string"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"sla": {
|
|
54
|
-
"type": "object",
|
|
55
|
-
"description": "Service level agreement",
|
|
56
|
-
"properties": {
|
|
57
|
-
"availability": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"description": "Target availability (e.g., '99.9%')",
|
|
60
|
-
"pattern": "^\\d+(\\.\\d+)?%$"
|
|
61
|
-
},
|
|
62
|
-
"responseTime": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"description": "Target response time (e.g., '200ms')"
|
|
65
|
-
},
|
|
66
|
-
"errorRate": {
|
|
67
|
-
"type": "string",
|
|
68
|
-
"description": "Maximum error rate (e.g., '0.1%')"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"support": {
|
|
73
|
-
"type": "object",
|
|
74
|
-
"description": "Support contact information",
|
|
75
|
-
"properties": {
|
|
76
|
-
"email": {
|
|
77
|
-
"type": "string",
|
|
78
|
-
"format": "email"
|
|
79
|
-
},
|
|
80
|
-
"slack": {
|
|
81
|
-
"type": "string",
|
|
82
|
-
"description": "Slack channel (e.g., '#platform-support')"
|
|
83
|
-
},
|
|
84
|
-
"pagerduty": {
|
|
85
|
-
"type": "string",
|
|
86
|
-
"description": "PagerDuty service name"
|
|
87
|
-
},
|
|
88
|
-
"oncall": {
|
|
89
|
-
"type": "string",
|
|
90
|
-
"description": "On-call rotation URL"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"contract": {
|
|
95
|
-
"type": "object",
|
|
96
|
-
"description": "Output contract versioning",
|
|
97
|
-
"required": ["version"],
|
|
98
|
-
"properties": {
|
|
99
|
-
"version": {
|
|
100
|
-
"type": "string",
|
|
101
|
-
"description": "Contract version (semver)",
|
|
102
|
-
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
103
|
-
},
|
|
104
|
-
"breaking": {
|
|
105
|
-
"type": "array",
|
|
106
|
-
"description": "Breaking changes in this version",
|
|
107
|
-
"items": {
|
|
108
|
-
"type": "string"
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"deprecated": {
|
|
112
|
-
"type": "array",
|
|
113
|
-
"description": "Deprecated output fields",
|
|
114
|
-
"items": {
|
|
115
|
-
"type": "object",
|
|
116
|
-
"properties": {
|
|
117
|
-
"field": {
|
|
118
|
-
"type": "string"
|
|
119
|
-
},
|
|
120
|
-
"since": {
|
|
121
|
-
"type": "string"
|
|
122
|
-
},
|
|
123
|
-
"removeIn": {
|
|
124
|
-
"type": "string"
|
|
125
|
-
},
|
|
126
|
-
"replacement": {
|
|
127
|
-
"type": "string"
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
22
|
}
|
|
134
23
|
}
|
|
135
24
|
},
|
|
136
|
-
"
|
|
25
|
+
"build": {
|
|
137
26
|
"type": "object",
|
|
138
|
-
"description": "
|
|
27
|
+
"description": "Docker build configuration",
|
|
139
28
|
"properties": {
|
|
140
|
-
"
|
|
141
|
-
"type": "object",
|
|
142
|
-
"properties": {
|
|
143
|
-
"endpoint": {
|
|
144
|
-
"type": "string",
|
|
145
|
-
"default": "/health"
|
|
146
|
-
},
|
|
147
|
-
"port": {
|
|
148
|
-
"type": "integer",
|
|
149
|
-
"minimum": 1,
|
|
150
|
-
"maximum": 65535
|
|
151
|
-
},
|
|
152
|
-
"scheme": {
|
|
153
|
-
"type": "string",
|
|
154
|
-
"enum": ["http", "https"],
|
|
155
|
-
"default": "http"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
"metrics": {
|
|
160
|
-
"type": "object",
|
|
161
|
-
"properties": {
|
|
162
|
-
"endpoint": {
|
|
163
|
-
"type": "string",
|
|
164
|
-
"default": "/metrics"
|
|
165
|
-
},
|
|
166
|
-
"port": {
|
|
167
|
-
"type": "integer",
|
|
168
|
-
"minimum": 1,
|
|
169
|
-
"maximum": 65535
|
|
170
|
-
},
|
|
171
|
-
"format": {
|
|
172
|
-
"type": "string",
|
|
173
|
-
"enum": ["prometheus", "opentelemetry"],
|
|
174
|
-
"default": "prometheus"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"logs": {
|
|
179
|
-
"type": "object",
|
|
180
|
-
"properties": {
|
|
181
|
-
"format": {
|
|
182
|
-
"type": "string",
|
|
183
|
-
"enum": ["json", "text"],
|
|
184
|
-
"default": "json"
|
|
185
|
-
},
|
|
186
|
-
"level": {
|
|
187
|
-
"type": "string",
|
|
188
|
-
"enum": ["debug", "info", "warn", "error"],
|
|
189
|
-
"default": "info"
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"security": {
|
|
196
|
-
"type": "object",
|
|
197
|
-
"description": "Security policies",
|
|
198
|
-
"properties": {
|
|
199
|
-
"networkPolicy": {
|
|
200
|
-
"type": "object",
|
|
201
|
-
"properties": {
|
|
202
|
-
"enabled": {
|
|
203
|
-
"type": "boolean",
|
|
204
|
-
"default": true
|
|
205
|
-
},
|
|
206
|
-
"ingress": {
|
|
207
|
-
"type": "array",
|
|
208
|
-
"items": {
|
|
209
|
-
"type": "object",
|
|
210
|
-
"properties": {
|
|
211
|
-
"from": {
|
|
212
|
-
"type": "array"
|
|
213
|
-
},
|
|
214
|
-
"ports": {
|
|
215
|
-
"type": "array",
|
|
216
|
-
"items": {
|
|
217
|
-
"type": "integer"
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
"egress": {
|
|
224
|
-
"type": "array",
|
|
225
|
-
"items": {
|
|
226
|
-
"type": "object"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
"accessControl": {
|
|
232
|
-
"type": "object",
|
|
233
|
-
"description": "Access control configuration",
|
|
234
|
-
"properties": {
|
|
235
|
-
"identity": {
|
|
236
|
-
"type": "string",
|
|
237
|
-
"description": "Service identity (e.g., service account, IAM role)"
|
|
238
|
-
},
|
|
239
|
-
"roles": {
|
|
240
|
-
"type": "array",
|
|
241
|
-
"description": "Required roles or permissions",
|
|
242
|
-
"items": {
|
|
243
|
-
"type": "string"
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
"secrets": {
|
|
249
|
-
"type": "object",
|
|
250
|
-
"properties": {
|
|
251
|
-
"provider": {
|
|
252
|
-
"type": "string",
|
|
253
|
-
"enum": ["kubernetes", "vault", "aws-secrets-manager", "azure-keyvault"]
|
|
254
|
-
},
|
|
255
|
-
"path": {
|
|
256
|
-
"type": "string"
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
"dev": {
|
|
263
|
-
"type": "object",
|
|
264
|
-
"description": "Local development configuration for running the service with hot reload",
|
|
265
|
-
"properties": {
|
|
266
|
-
"command": {
|
|
29
|
+
"context": {
|
|
267
30
|
"type": "string",
|
|
268
|
-
"description": "
|
|
269
|
-
"
|
|
31
|
+
"description": "Build context path ('root' for project root, '.' for service directory, or relative path)",
|
|
32
|
+
"default": "."
|
|
270
33
|
},
|
|
271
|
-
"
|
|
272
|
-
"type": "integer",
|
|
273
|
-
"description": "Port the local dev server listens on",
|
|
274
|
-
"minimum": 1,
|
|
275
|
-
"maximum": 65535,
|
|
276
|
-
"default": 3000
|
|
277
|
-
},
|
|
278
|
-
"cwd": {
|
|
34
|
+
"dockerfile": {
|
|
279
35
|
"type": "string",
|
|
280
|
-
"description": "
|
|
281
|
-
|
|
282
|
-
"env": {
|
|
283
|
-
"type": "object",
|
|
284
|
-
"description": "Additional environment variables for dev mode",
|
|
285
|
-
"additionalProperties": {
|
|
286
|
-
"type": "string"
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
"expose": {
|
|
290
|
-
"type": "object",
|
|
291
|
-
"description": "How this service should be exposed when running in cluster (for port-forwarding to local dev)",
|
|
292
|
-
"properties": {
|
|
293
|
-
"port": {
|
|
294
|
-
"type": "integer",
|
|
295
|
-
"description": "Port to forward (e.g., 5432 for postgres, 80 for HTTP)",
|
|
296
|
-
"minimum": 1,
|
|
297
|
-
"maximum": 65535
|
|
298
|
-
},
|
|
299
|
-
"protocol": {
|
|
300
|
-
"type": "string",
|
|
301
|
-
"description": "URL protocol for connection string (e.g., 'postgres', 'redis', 'http')",
|
|
302
|
-
"enum": ["http", "https", "postgres", "mysql", "redis", "mongodb", "amqp", "kafka"]
|
|
303
|
-
},
|
|
304
|
-
"envVar": {
|
|
305
|
-
"type": "string",
|
|
306
|
-
"description": "Environment variable name for consumers (e.g., 'DATABASE_URL')",
|
|
307
|
-
"pattern": "^[A-Z][A-Z0-9_]*$"
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
"required": ["port"]
|
|
36
|
+
"description": "Path to Dockerfile relative to build context",
|
|
37
|
+
"default": "Dockerfile"
|
|
311
38
|
}
|
|
312
39
|
}
|
|
313
40
|
},
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DevConfig, LocalDevService, PortForwardMapping } from './types';
|
|
2
|
-
export declare function serviceToEnvVar(serviceName: string): string;
|
|
3
|
-
export declare function getServiceProtocol(serviceName: string): string;
|
|
4
|
-
export declare function isDatabaseService(serviceName: string): boolean;
|
|
5
|
-
export declare function buildPortForwardUrl(mapping: PortForwardMapping): string;
|
|
6
|
-
export declare function buildLocalServiceUrl(localService: LocalDevService): string;
|
|
7
|
-
export declare function buildDevEnvironment(targetService: LocalDevService, allLocalServices: LocalDevService[], portForwards: PortForwardMapping[], devConfig: DevConfig): Record<string, string>;
|
|
8
|
-
export declare function buildAllDevEnvironments(localServices: LocalDevService[], portForwards: PortForwardMapping[]): Map<string, Record<string, string>>;
|
|
9
|
-
//# sourceMappingURL=env-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env-builder.d.ts","sourceRoot":"","sources":["../../src/dev/env-builder.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,SAAS,EACT,eAAe,EACf,kBAAkB,EAGnB,MAAM,SAAS,CAAA;AAUhB,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAK3D;AAOD,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAY9D;AAKD,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAG9D;AAKD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CASvE;AAKD,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,eAAe,GAAG,MAAM,CAE1E;AASD,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,eAAe,EAC9B,gBAAgB,EAAE,eAAe,EAAE,EACnC,YAAY,EAAE,kBAAkB,EAAE,EAClC,SAAS,EAAE,SAAS,GACnB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA6BxB;AAOD,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,eAAe,EAAE,EAChC,YAAY,EAAE,kBAAkB,EAAE,GACjC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAcrC"}
|