Skip to content

Commit 1f124cb

Browse files
Kevin/new transformation model (#14)
* feat: Bumped library version. New transformations type * feat: Bumped library version. Updated homebrew to only returned user specified * feat: Bumped library version. Added prevent import to action and xcode-tools. Fixed aws-profile for imports * fix: Fixed jenv implementation (made it so that it's bi-directional and resiliant to homebrew updates. The versions now are stable by using the file location instead of the direct version installed by jenv (since it installs 3 for 17.0.24 -> 17, 17.0, 17.0.24). Added rehashing functionality) + file * fix: Fixed jenv results not de-duped * fix: Fixed path results not returned. Changed to all paths filtered with system paths found on fs * feat: Added descriptions to all JSON schemas * feat: Added allow multiple support * feat: Improved path resource by finally modifying it to search through user files for paths instead of spewing everything in path. Fixed tests and improved git clone to have a better matcher * fix: Path improvements * fix: Path not showing up in imports and removed logs
1 parent 1b9ab1b commit 1f124cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+579
-233
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "default",
3-
"version": "0.11.0",
3+
"version": "0.12.3",
44
"description": "",
55
"main": "dist/index.js",
66
"scripts": {
@@ -23,7 +23,7 @@
2323
"ajv": "^8.12.0",
2424
"ajv-formats": "^2.1.1",
2525
"semver": "^7.6.0",
26-
"codify-plugin-lib": "1.0.132",
26+
"codify-plugin-lib": "1.0.166",
2727
"codify-schemas": "1.0.63",
2828
"chalk": "^5.3.0",
2929
"debug": "^4.3.4",
@@ -50,7 +50,7 @@
5050
"@types/debug": "4.1.12",
5151
"@types/plist": "^3.0.5",
5252
"@types/lodash.isequal": "^4.5.8",
53-
"codify-plugin-test": "0.0.47",
53+
"codify-plugin-test": "0.0.49",
5454
"commander": "^12.1.0",
5555
"eslint": "^8.51.0",
5656
"eslint-config-oclif": "^5",

scripts/build.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ const mergedSchemas = [...schemasMap.entries()].map(([type, schema]) => {
7474

7575
delete resourceSchema.$id;
7676
delete resourceSchema.$schema;
77-
resourceSchema.description = `Resource type: "${type}" | ${resourceSchema.title}`;
7877
delete resourceSchema.title;
78+
delete resourceSchema.oneOf;
7979
delete resourceSchema.properties.type;
8080

8181
if (schema) {
8282
delete schema.$id;
8383
delete schema.$schema;
8484
delete schema.title;
85+
delete schema.oneOf;
8586
}
8687

8788
return mergeJsonSchemas([schema ?? {}, resourceSchema, { properties: { type: { const: type, type: 'string' } } }]);

src/resources/android/android-studio-schema.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
"$id": "https://www.codifycli.com/pgcli.json",
44
"title": "Android studios resource",
55
"type": "object",
6+
"description": "Install Android Studios.",
67
"properties": {
78
"version": {
89
"type": "string",
910
"description": "Android studios version. Visit: https://developer.android.com/studio/releases for version info"
1011
},
1112
"directory": {
12-
13+
"type": "string",
14+
"description": "The directory to install Android Studios into. Defaults to /Applications",
15+
"default": "/Applications"
1316
}
1417
},
1518
"additionalProperties": false

src/resources/asdf/asdf-global-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"$id": "https://www.codifycli.com/asdf-global-schema.json",
44
"title": "Asdf plugin global resource",
55
"type": "object",
6+
"description": "Manage the asdf global version for a tool. An asdf-global or asdf-local resource must be specified before a tool installed with asdf is active in the shell.",
67
"properties": {
78
"plugin": {
89
"type": "string",

src/resources/asdf/asdf-global.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class AsdfGlobalResource extends Resource<AsdfGlobalConfig> {
1818
id: 'asdf-global',
1919
dependencies: ['asdf', 'asdf-plugin'],
2020
schema: AsdfGlobalSchema,
21-
import: {
21+
importAndDestroy:{
2222
requiredParameters: ['plugin'],
2323
refreshKeys: ['plugin', 'version'],
2424
defaultRefreshValues: {

src/resources/asdf/asdf-install-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"$id": "https://www.codifycli.com/asdf-install-schema.json",
44
"title": "Asdf plugin resource",
55
"type": "object",
6+
"description": "Install a .tools-version file or directly install an asdf plugin + tool version.",
67
"properties": {
78
"plugin": {
89
"type": "string",

src/resources/asdf/asdf-install.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export class AsdfInstallResource extends Resource<AsdfInstallConfig> {
2525
dependencies: ['asdf'],
2626
schema: AsdfInstallSchema,
2727
parameterSettings: {
28-
directory: { type: 'directory', inputTransformation: (input) => untildify(input) },
28+
directory: { type: 'directory' },
2929
versions: { type: 'array' }
3030
},
31-
import: {
31+
importAndDestroy:{
3232
requiredParameters: ['directory'],
3333
refreshKeys: ['directory']
3434
},

src/resources/asdf/asdf-local-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://www.codifycli.com/asdf-local-schema.json",
44
"title": "Asdf plugin local resource",
5+
"description": "Manage the asdf local version for a tool. An asdf-global or asdf-local resource must be specified before a tool installed with asdf is active in the shell.",
56
"type": "object",
67
"properties": {
78
"plugin": {

src/resources/asdf/asdf-local.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,13 @@ export class AsdfLocalResource extends Resource<AsdfLocalConfig> {
3333
dependencies: ['asdf', 'asdf-plugin'],
3434
schema: AsdfLocalSchema,
3535
parameterSettings: {
36-
directory: {
37-
inputTransformation: (input) => untildify(input),
38-
},
39-
directories: {
40-
type: 'array',
41-
canModify: true,
42-
inputTransformation: (input) => input.map((i: any) => untildify(i)),
43-
},
36+
directory: { type: 'directory' },
37+
directories: { type: 'array', canModify: true, itemType: 'directory' },
4438
version: {
4539
canModify: true,
4640
}
4741
},
48-
import: {
42+
importAndDestroy:{
4943
requiredParameters: ['plugin', 'directory'],
5044
refreshKeys: ['plugin', 'version', 'directory'],
5145
defaultRefreshValues: {

src/resources/asdf/asdf-plugin-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://www.codifycli.com/asdf-plugin-schema.json",
44
"title": "Asdf plugin resource",
5+
"description": "Installs a plugin and manages specific tool versions.",
56
"type": "object",
67
"properties": {
78
"plugin": {

0 commit comments

Comments
 (0)