@quarry-systems/drift-secrets 0.1.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/README.md +115 -0
- package/package.json +35 -0
- package/src/index.d.ts +95 -0
- package/src/index.js +193 -0
- package/src/index.js.map +1 -0
- package/src/plugin.manifest.d.ts +9 -0
- package/src/plugin.manifest.js +47 -0
- package/src/plugin.manifest.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# @quarry-systems/mcg-secrets
|
|
2
|
+
|
|
3
|
+
 
|
|
4
|
+
|
|
5
|
+
Secrets adapter for MCG - environment variables and literal values.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Environment variables**: Read from `process.env`
|
|
10
|
+
- **Literal values**: Hardcoded secrets for testing
|
|
11
|
+
- **Composite adapter**: Chain multiple secret sources with fallback
|
|
12
|
+
- **Type-safe**: Full TypeScript support
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @quarry-systems/mcg-secrets
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Environment Variables
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { createEnvSecretsAdapter } from '@quarry-systems/mcg-secrets';
|
|
26
|
+
|
|
27
|
+
const secrets = createEnvSecretsAdapter();
|
|
28
|
+
|
|
29
|
+
// Read from process.env.OPENAI_API_KEY
|
|
30
|
+
const apiKey = await secrets.get({ key: 'OPENAI_API_KEY' });
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Literal Values
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { createLiteralSecretsAdapter } from '@quarry-systems/mcg-secrets';
|
|
37
|
+
|
|
38
|
+
const secrets = createLiteralSecretsAdapter({
|
|
39
|
+
'API_KEY': 'test-key-123',
|
|
40
|
+
'DATABASE_URL': 'postgresql://localhost/test'
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const apiKey = await secrets.get({ key: 'API_KEY' });
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Composite (Fallback Chain)
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import {
|
|
50
|
+
createCompositeSecretsAdapter,
|
|
51
|
+
createEnvSecretsAdapter,
|
|
52
|
+
createLiteralSecretsAdapter
|
|
53
|
+
} from '@quarry-systems/mcg-secrets';
|
|
54
|
+
|
|
55
|
+
const secrets = createCompositeSecretsAdapter([
|
|
56
|
+
createEnvSecretsAdapter(), // Try env first
|
|
57
|
+
createLiteralSecretsAdapter({ // Fallback to literals
|
|
58
|
+
'API_KEY': 'default-key'
|
|
59
|
+
})
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
// Returns process.env.API_KEY if set, otherwise 'default-key'
|
|
63
|
+
const apiKey = await secrets.get({ key: 'API_KEY' });
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Integration with MCG
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { ManagedCyclicGraph } from '@quarry-systems/managed-cyclic-graph';
|
|
70
|
+
import { createEnvSecretsAdapter } from '@quarry-systems/mcg-secrets';
|
|
71
|
+
|
|
72
|
+
// Create secrets adapter
|
|
73
|
+
const secrets = createEnvSecretsAdapter();
|
|
74
|
+
|
|
75
|
+
// Build graph with secrets plugin
|
|
76
|
+
const graph = new ManagedCyclicGraph()
|
|
77
|
+
.use({ services: { secrets } })
|
|
78
|
+
.node('callAPI', {
|
|
79
|
+
type: 'action',
|
|
80
|
+
action: async (ctx, services) => {
|
|
81
|
+
// Get API key from environment
|
|
82
|
+
const apiKey = await services.secrets.get({ key: 'OPENAI_API_KEY' });
|
|
83
|
+
|
|
84
|
+
const response = await fetch('https://api.openai.com/v1/models', {
|
|
85
|
+
headers: {
|
|
86
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
87
|
+
'Content-Type': 'application/json'
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
return { models: await response.json() };
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
.build();
|
|
95
|
+
|
|
96
|
+
// Execute
|
|
97
|
+
await graph.run({ input: 'list models' });
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## API
|
|
101
|
+
|
|
102
|
+
Implements `SecretsAdapter` from `@quarry-systems/mcg-contracts`:
|
|
103
|
+
|
|
104
|
+
- `get(ref)` - Get secret value by key
|
|
105
|
+
- `list()` - List available secret keys (env adapter only)
|
|
106
|
+
|
|
107
|
+
## Testing
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm test
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@quarry-systems/drift-secrets",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Secrets adapter for Drift - environment variables and literal values",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc -p .",
|
|
9
|
+
"test": "vitest run",
|
|
10
|
+
"test:watch": "vitest"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"drift",
|
|
14
|
+
"secrets",
|
|
15
|
+
"configuration",
|
|
16
|
+
"environment",
|
|
17
|
+
"backend",
|
|
18
|
+
"node"
|
|
19
|
+
],
|
|
20
|
+
"author": "Quarry Systems",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=18.0.0"
|
|
24
|
+
},
|
|
25
|
+
"browser": false,
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"typescript": "^5.3.0",
|
|
28
|
+
"vitest": "^2.1.0"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"src"
|
|
33
|
+
],
|
|
34
|
+
"type": "commonjs"
|
|
35
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025-2026 Quarry Systems (Brett Nye)
|
|
3
|
+
*
|
|
4
|
+
* This file is part of MCG (Managed Cyclic Graph).
|
|
5
|
+
*
|
|
6
|
+
* MCG is dual-licensed under:
|
|
7
|
+
* 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
8
|
+
* See LICENSE-AGPL or https://www.gnu.org/licenses/agpl-3.0.html
|
|
9
|
+
* 2. Commercial License
|
|
10
|
+
* See LICENSE-COMMERCIAL.md or contact licensing@quarry-systems.com
|
|
11
|
+
*
|
|
12
|
+
* You may use this file under the terms of either license.
|
|
13
|
+
*
|
|
14
|
+
* For commercial licensing inquiries:
|
|
15
|
+
* Email: licensing@quarry-systems.com
|
|
16
|
+
* Web: https://quarry-systems.com/license
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* MCG Secrets Adapter
|
|
20
|
+
*
|
|
21
|
+
* Provides secrets resolution from environment variables and literal values.
|
|
22
|
+
* For AWS SSM support, use @quarry-systems/mcg-secrets-ssm.
|
|
23
|
+
*
|
|
24
|
+
* @packageDocumentation
|
|
25
|
+
*/
|
|
26
|
+
import type { SecretsAdapter, CompositeSecretsAdapter, SecretRef } from '@quarry-systems/drift-contracts';
|
|
27
|
+
/**
|
|
28
|
+
* Environment variable secrets adapter.
|
|
29
|
+
*
|
|
30
|
+
* Resolves references in the format `env:VARIABLE_NAME`.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const secrets = envSecretsAdapter();
|
|
35
|
+
* const apiKey = await secrets.resolve('env:OPENAI_API_KEY');
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function envSecretsAdapter(): SecretsAdapter;
|
|
39
|
+
/**
|
|
40
|
+
* Literal secrets adapter.
|
|
41
|
+
*
|
|
42
|
+
* Resolves references in the format `literal:value`.
|
|
43
|
+
* Useful for testing without real secrets.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* const secrets = literalSecretsAdapter();
|
|
48
|
+
* const value = await secrets.resolve('literal:my-test-value');
|
|
49
|
+
* // Returns: 'my-test-value'
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function literalSecretsAdapter(): SecretsAdapter;
|
|
53
|
+
/**
|
|
54
|
+
* Create a composite secrets adapter that chains multiple adapters.
|
|
55
|
+
*
|
|
56
|
+
* References are routed to the first adapter that can handle them.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* const secrets = createSecretsAdapter()
|
|
61
|
+
* .use(envSecretsAdapter())
|
|
62
|
+
* .use(literalSecretsAdapter());
|
|
63
|
+
*
|
|
64
|
+
* // Routes to env adapter
|
|
65
|
+
* await secrets.resolve('env:API_KEY');
|
|
66
|
+
*
|
|
67
|
+
* // Routes to literal adapter
|
|
68
|
+
* await secrets.resolve('literal:test-value');
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare function createSecretsAdapter(): CompositeSecretsAdapter;
|
|
72
|
+
/**
|
|
73
|
+
* Resolve a secret, throwing if not found.
|
|
74
|
+
*
|
|
75
|
+
* @param adapter - Secrets adapter to use
|
|
76
|
+
* @param ref - Secret reference
|
|
77
|
+
* @returns Secret value
|
|
78
|
+
* @throws Error if secret not found
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* const apiKey = await resolveRequired(secrets, 'env:API_KEY');
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export declare function resolveRequired(adapter: SecretsAdapter, ref: SecretRef): Promise<string>;
|
|
86
|
+
/**
|
|
87
|
+
* Create a default secrets adapter with env and literal support.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* const secrets = defaultSecretsAdapter();
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare function defaultSecretsAdapter(): CompositeSecretsAdapter;
|
|
95
|
+
export type { SecretsAdapter, CompositeSecretsAdapter, SecretRef, } from '@quarry-systems/drift-contracts';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025-2026 Quarry Systems (Brett Nye)
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MCG (Managed Cyclic Graph).
|
|
6
|
+
*
|
|
7
|
+
* MCG is dual-licensed under:
|
|
8
|
+
* 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
9
|
+
* See LICENSE-AGPL or https://www.gnu.org/licenses/agpl-3.0.html
|
|
10
|
+
* 2. Commercial License
|
|
11
|
+
* See LICENSE-COMMERCIAL.md or contact licensing@quarry-systems.com
|
|
12
|
+
*
|
|
13
|
+
* You may use this file under the terms of either license.
|
|
14
|
+
*
|
|
15
|
+
* For commercial licensing inquiries:
|
|
16
|
+
* Email: licensing@quarry-systems.com
|
|
17
|
+
* Web: https://quarry-systems.com/license
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.envSecretsAdapter = envSecretsAdapter;
|
|
21
|
+
exports.literalSecretsAdapter = literalSecretsAdapter;
|
|
22
|
+
exports.createSecretsAdapter = createSecretsAdapter;
|
|
23
|
+
exports.resolveRequired = resolveRequired;
|
|
24
|
+
exports.defaultSecretsAdapter = defaultSecretsAdapter;
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// Environment Variables Adapter
|
|
27
|
+
// ============================================================================
|
|
28
|
+
/**
|
|
29
|
+
* Environment variable secrets adapter.
|
|
30
|
+
*
|
|
31
|
+
* Resolves references in the format `env:VARIABLE_NAME`.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const secrets = envSecretsAdapter();
|
|
36
|
+
* const apiKey = await secrets.resolve('env:OPENAI_API_KEY');
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
function envSecretsAdapter() {
|
|
40
|
+
return {
|
|
41
|
+
name: 'env',
|
|
42
|
+
canResolve(ref) {
|
|
43
|
+
return ref.startsWith('env:');
|
|
44
|
+
},
|
|
45
|
+
async resolve(ref) {
|
|
46
|
+
if (!this.canResolve(ref))
|
|
47
|
+
return undefined;
|
|
48
|
+
const varName = ref.slice(4); // Remove 'env:'
|
|
49
|
+
return process.env[varName];
|
|
50
|
+
},
|
|
51
|
+
async resolveMany(refs) {
|
|
52
|
+
const results = new Map();
|
|
53
|
+
for (const ref of refs) {
|
|
54
|
+
if (this.canResolve(ref)) {
|
|
55
|
+
results.set(ref, await this.resolve(ref));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return results;
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// ============================================================================
|
|
63
|
+
// Literal Adapter (for testing)
|
|
64
|
+
// ============================================================================
|
|
65
|
+
/**
|
|
66
|
+
* Literal secrets adapter.
|
|
67
|
+
*
|
|
68
|
+
* Resolves references in the format `literal:value`.
|
|
69
|
+
* Useful for testing without real secrets.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* const secrets = literalSecretsAdapter();
|
|
74
|
+
* const value = await secrets.resolve('literal:my-test-value');
|
|
75
|
+
* // Returns: 'my-test-value'
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
function literalSecretsAdapter() {
|
|
79
|
+
return {
|
|
80
|
+
name: 'literal',
|
|
81
|
+
canResolve(ref) {
|
|
82
|
+
return ref.startsWith('literal:');
|
|
83
|
+
},
|
|
84
|
+
async resolve(ref) {
|
|
85
|
+
if (!this.canResolve(ref))
|
|
86
|
+
return undefined;
|
|
87
|
+
return ref.slice(8); // Remove 'literal:'
|
|
88
|
+
},
|
|
89
|
+
async resolveMany(refs) {
|
|
90
|
+
const results = new Map();
|
|
91
|
+
for (const ref of refs) {
|
|
92
|
+
if (this.canResolve(ref)) {
|
|
93
|
+
results.set(ref, await this.resolve(ref));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return results;
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
// ============================================================================
|
|
101
|
+
// Composite Adapter
|
|
102
|
+
// ============================================================================
|
|
103
|
+
/**
|
|
104
|
+
* Create a composite secrets adapter that chains multiple adapters.
|
|
105
|
+
*
|
|
106
|
+
* References are routed to the first adapter that can handle them.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```typescript
|
|
110
|
+
* const secrets = createSecretsAdapter()
|
|
111
|
+
* .use(envSecretsAdapter())
|
|
112
|
+
* .use(literalSecretsAdapter());
|
|
113
|
+
*
|
|
114
|
+
* // Routes to env adapter
|
|
115
|
+
* await secrets.resolve('env:API_KEY');
|
|
116
|
+
*
|
|
117
|
+
* // Routes to literal adapter
|
|
118
|
+
* await secrets.resolve('literal:test-value');
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
function createSecretsAdapter() {
|
|
122
|
+
const adapters = [];
|
|
123
|
+
return {
|
|
124
|
+
name: 'composite',
|
|
125
|
+
use(adapter) {
|
|
126
|
+
adapters.push(adapter);
|
|
127
|
+
return this;
|
|
128
|
+
},
|
|
129
|
+
canResolve(ref) {
|
|
130
|
+
return adapters.some(a => a.canResolve(ref));
|
|
131
|
+
},
|
|
132
|
+
async resolve(ref) {
|
|
133
|
+
for (const adapter of adapters) {
|
|
134
|
+
if (adapter.canResolve(ref)) {
|
|
135
|
+
return adapter.resolve(ref);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return undefined;
|
|
139
|
+
},
|
|
140
|
+
async resolveMany(refs) {
|
|
141
|
+
const results = new Map();
|
|
142
|
+
const remaining = new Set(refs);
|
|
143
|
+
for (const adapter of adapters) {
|
|
144
|
+
const canHandle = Array.from(remaining).filter(r => adapter.canResolve(r));
|
|
145
|
+
if (canHandle.length > 0) {
|
|
146
|
+
const adapterResults = await adapter.resolveMany(canHandle);
|
|
147
|
+
for (const [ref, value] of adapterResults) {
|
|
148
|
+
results.set(ref, value);
|
|
149
|
+
remaining.delete(ref);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return results;
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
// ============================================================================
|
|
158
|
+
// Helper Functions
|
|
159
|
+
// ============================================================================
|
|
160
|
+
/**
|
|
161
|
+
* Resolve a secret, throwing if not found.
|
|
162
|
+
*
|
|
163
|
+
* @param adapter - Secrets adapter to use
|
|
164
|
+
* @param ref - Secret reference
|
|
165
|
+
* @returns Secret value
|
|
166
|
+
* @throws Error if secret not found
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* const apiKey = await resolveRequired(secrets, 'env:API_KEY');
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
async function resolveRequired(adapter, ref) {
|
|
174
|
+
const value = await adapter.resolve(ref);
|
|
175
|
+
if (value === undefined) {
|
|
176
|
+
throw new Error(`Secret not found: ${ref}`);
|
|
177
|
+
}
|
|
178
|
+
return value;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Create a default secrets adapter with env and literal support.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* const secrets = defaultSecretsAdapter();
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
function defaultSecretsAdapter() {
|
|
189
|
+
return createSecretsAdapter()
|
|
190
|
+
.use(envSecretsAdapter())
|
|
191
|
+
.use(literalSecretsAdapter());
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/drift/drift-plugins/mcg-secrets/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;AAgCH,8CAwBC;AAmBD,sDAuBC;AAwBD,oDA0CC;AAmBD,0CASC;AAUD,sDAIC;AA7LD,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E;;;;;;;;;;GAUG;AACH,SAAgB,iBAAiB;IAC/B,OAAO;QACL,IAAI,EAAE,KAAK;QAEX,UAAU,CAAC,GAAc;YACvB,OAAO,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;QAED,KAAK,CAAC,OAAO,CAAC,GAAc;YAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;gBAAE,OAAO,SAAS,CAAC;YAC5C,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB;YAC9C,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;QAED,KAAK,CAAC,WAAW,CAAC,IAAiB;YACjC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAiC,CAAC;YACzD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBACvB,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC5C,CAAC;YACH,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E;;;;;;;;;;;;GAYG;AACH,SAAgB,qBAA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ACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,qBAAqB;IACnC,OAAO,oBAAoB,EAAE;SAC1B,GAAG,CAAC,iBAAiB,EAAE,CAAC;SACxB,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Manifest for @quarry-systems/mcg-secrets
|
|
3
|
+
*
|
|
4
|
+
* This manifest declares the plugin's metadata, capabilities, and requirements.
|
|
5
|
+
* It enables future security policies, sandboxing, and hosted execution.
|
|
6
|
+
*/
|
|
7
|
+
import type { PluginManifest } from '@quarry-systems/drift-contracts';
|
|
8
|
+
export declare const manifest: PluginManifest;
|
|
9
|
+
export default manifest;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Manifest for @quarry-systems/mcg-secrets
|
|
4
|
+
*
|
|
5
|
+
* This manifest declares the plugin's metadata, capabilities, and requirements.
|
|
6
|
+
* It enables future security policies, sandboxing, and hosted execution.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.manifest = void 0;
|
|
10
|
+
exports.manifest = {
|
|
11
|
+
name: '@quarry-systems/mcg-secrets',
|
|
12
|
+
version: '0.6.0',
|
|
13
|
+
apiVersion: '1.0',
|
|
14
|
+
description: 'Secrets management plugin for Managed Cyclic Graph (MCG)',
|
|
15
|
+
author: {
|
|
16
|
+
name: 'Quarry Systems',
|
|
17
|
+
email: 'support@quarrysystems.com',
|
|
18
|
+
},
|
|
19
|
+
license: 'ISC',
|
|
20
|
+
type: ['node'],
|
|
21
|
+
capabilities: {
|
|
22
|
+
network: false,
|
|
23
|
+
filesystem: false,
|
|
24
|
+
secrets: true, // Manages secrets
|
|
25
|
+
subprocess: false,
|
|
26
|
+
},
|
|
27
|
+
nodes: [],
|
|
28
|
+
services: [
|
|
29
|
+
{
|
|
30
|
+
id: 'secrets',
|
|
31
|
+
name: 'Secrets Service',
|
|
32
|
+
description: 'Base secrets management service',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
peerDependencies: {
|
|
36
|
+
'@quarry-systems/drift-core': '^0.6.0',
|
|
37
|
+
'@quarry-systems/drift-contracts': '^0.6.0',
|
|
38
|
+
},
|
|
39
|
+
keywords: ['drift', 'mcg', 'managed-cyclic-graph', 'plugin', 'secrets', 'security', 'credentials'],
|
|
40
|
+
repository: {
|
|
41
|
+
type: 'git',
|
|
42
|
+
url: 'https://github.com/quarry-systems/quarry-systems',
|
|
43
|
+
directory: 'libs/drift/drift-plugins/mcg-secrets',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
exports.default = exports.manifest;
|
|
47
|
+
//# sourceMappingURL=plugin.manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.manifest.js","sourceRoot":"","sources":["../../../../../../libs/drift/drift-plugins/mcg-secrets/src/plugin.manifest.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIU,QAAA,QAAQ,GAAmB;IACtC,IAAI,EAAE,6BAA6B;IACnC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,KAAK;IAEjB,WAAW,EAAE,0DAA0D;IAEvE,MAAM,EAAE;QACN,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,2BAA2B;KACnC;IAED,OAAO,EAAE,KAAK;IAEd,IAAI,EAAE,CAAC,MAAM,CAAC;IAEd,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,IAAI,EAAO,kBAAkB;QACtC,UAAU,EAAE,KAAK;KAClB;IAED,KAAK,EAAE,EAAE;IAET,QAAQ,EAAE;QACR;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,iCAAiC;SAC/C;KACF;IAED,gBAAgB,EAAE;QAChB,4BAA4B,EAAE,QAAQ;QACtC,iCAAiC,EAAE,QAAQ;KAC5C;IAED,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,CAAC;IAElG,UAAU,EAAE;QACV,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,kDAAkD;QACvD,SAAS,EAAE,sCAAsC;KAClD;CACF,CAAC;AAEF,kBAAe,gBAAQ,CAAC"}
|