@codifycli/plugin-core 1.0.0-beta3 → 1.0.0-beta5
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 +10 -44
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @codifycli/plugin-core
|
|
2
2
|
|
|
3
|
-
Core library for building [Codify](https://
|
|
3
|
+
Core library for building [Codify](https://codifycli.com) plugins. Codify is an infrastructure-as-code tool that
|
|
4
4
|
manages system resources (applications, CLI tools, and settings) through declarative JSON configuration files.
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -233,9 +233,7 @@ Two PTY implementations:
|
|
|
233
233
|
Configure resource behavior via `ResourceSettings<T>`:
|
|
234
234
|
|
|
235
235
|
```typescript
|
|
236
|
-
getSettings()
|
|
237
|
-
:
|
|
238
|
-
ResourceSettings < MyConfig > {
|
|
236
|
+
getSettings(): ResourceSettings<MyConfig> {
|
|
239
237
|
return {
|
|
240
238
|
// Required: unique type identifier
|
|
241
239
|
id: 'my-resource',
|
|
@@ -338,52 +336,20 @@ ResourceSettings < MyConfig > {
|
|
|
338
336
|
|
|
339
337
|
```typescript
|
|
340
338
|
// PTY access
|
|
341
|
-
getPty()
|
|
342
|
-
:
|
|
343
|
-
IPty
|
|
339
|
+
getPty(): IPty
|
|
344
340
|
|
|
345
341
|
// Path utilities
|
|
346
|
-
tildify(absolutePath
|
|
347
|
-
:
|
|
348
|
-
string
|
|
349
|
-
):
|
|
350
|
-
string
|
|
351
|
-
untildify(pathWithTilde
|
|
352
|
-
:
|
|
353
|
-
string
|
|
354
|
-
):
|
|
355
|
-
string
|
|
356
|
-
resolvePathWithVariables(path
|
|
357
|
-
:
|
|
358
|
-
string
|
|
359
|
-
):
|
|
360
|
-
string
|
|
361
|
-
addVariablesToPath(absolutePath
|
|
362
|
-
:
|
|
363
|
-
string
|
|
364
|
-
):
|
|
365
|
-
string
|
|
342
|
+
tildify(absolutePath: string): string
|
|
343
|
+
untildify(pathWithTilde: string): string
|
|
344
|
+
resolvePathWithVariables(path: string): string
|
|
345
|
+
addVariablesToPath(absolutePath: string): string
|
|
366
346
|
|
|
367
347
|
// File utilities
|
|
368
|
-
fileExists(path
|
|
369
|
-
:
|
|
370
|
-
string
|
|
371
|
-
):
|
|
372
|
-
Promise<boolean>
|
|
373
|
-
directoryExists(path
|
|
374
|
-
:
|
|
375
|
-
string
|
|
376
|
-
):
|
|
377
|
-
Promise<boolean>
|
|
348
|
+
fileExists(path: string): Promise<boolean>
|
|
349
|
+
directoryExists(path: string): Promise<boolean>
|
|
378
350
|
|
|
379
351
|
// Array utilities
|
|
380
|
-
areArraysEqual<T>(a
|
|
381
|
-
:
|
|
382
|
-
T[], b
|
|
383
|
-
:
|
|
384
|
-
T[], isEqual ? : (a: T, b: T) => boolean
|
|
385
|
-
):
|
|
386
|
-
boolean
|
|
352
|
+
areArraysEqual<T>(a: T[], b: T[], isEqual?: (a: T, b: T) => boolean): boolean
|
|
387
353
|
```
|
|
388
354
|
|
|
389
355
|
## Building Plugins
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codifycli/plugin-core",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta5",
|
|
4
4
|
"description": "TypeScript library for building Codify plugins to manage system resources (applications, CLI tools, settings) through infrastructure-as-code",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"type": "git",
|
|
34
34
|
"url": "https://github.com/codifycli/codify-plugin-core.git"
|
|
35
35
|
},
|
|
36
|
+
"homepage": "https://codifycli.com",
|
|
36
37
|
"license": "ISC",
|
|
37
38
|
"dependencies": {
|
|
38
39
|
"@codifycli/schemas": "1.0.0",
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"ts-node": "^10.9.1",
|
|
68
69
|
"tsc-watch": "^6.0.4",
|
|
69
70
|
"typescript": "^5",
|
|
70
|
-
"vitest": "^
|
|
71
|
+
"vitest": "^4.0.18",
|
|
71
72
|
"vitest-mock-extended": "^1.3.1"
|
|
72
73
|
},
|
|
73
74
|
"engines": {
|