@cbnventures/nova 0.22.6 → 0.23.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/build/package.json +1 -1
- package/build/src/cli/generate/github/workflows-blueprint.d.ts +1 -0
- package/build/src/cli/generate/github/workflows-blueprint.d.ts.map +1 -1
- package/build/src/cli/generate/github/workflows-blueprint.js +131 -187
- package/build/src/cli/generate/github/workflows-blueprint.js.map +1 -1
- package/build/src/cli/recipe/github/gh-precheck.d.ts +3 -0
- package/build/src/cli/recipe/github/gh-precheck.d.ts.map +1 -0
- package/build/src/cli/recipe/github/gh-precheck.js +111 -0
- package/build/src/cli/recipe/github/gh-precheck.js.map +1 -0
- package/build/src/cli/recipe/github/sync-features.d.ts.map +1 -1
- package/build/src/cli/recipe/github/sync-features.js +8 -98
- package/build/src/cli/recipe/github/sync-features.js.map +1 -1
- package/build/src/cli/recipe/github/sync-identity.d.ts.map +1 -1
- package/build/src/cli/recipe/github/sync-identity.js +10 -98
- package/build/src/cli/recipe/github/sync-identity.js.map +1 -1
- package/build/src/cli/recipe/github/sync-policies.d.ts.map +1 -1
- package/build/src/cli/recipe/github/sync-policies.js +8 -98
- package/build/src/cli/recipe/github/sync-policies.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts +0 -1
- package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-artifacts.js +6 -21
- package/build/src/cli/recipe/package-json/normalize-artifacts.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts +0 -1
- package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-dependencies.js +8 -23
- package/build/src/cli/recipe/package-json/normalize-dependencies.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-tooling.d.ts +0 -1
- package/build/src/cli/recipe/package-json/normalize-tooling.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-tooling.js +2 -17
- package/build/src/cli/recipe/package-json/normalize-tooling.js.map +1 -1
- package/build/src/cli/recipe/package-json/sync-environment.d.ts +0 -1
- package/build/src/cli/recipe/package-json/sync-environment.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/sync-environment.js +4 -19
- package/build/src/cli/recipe/package-json/sync-environment.js.map +1 -1
- package/build/src/cli/utility/changelog.d.ts.map +1 -1
- package/build/src/cli/utility/changelog.js +179 -86
- package/build/src/cli/utility/changelog.js.map +1 -1
- package/build/src/cli/utility/initialize.d.ts +1 -0
- package/build/src/cli/utility/initialize.d.ts.map +1 -1
- package/build/src/cli/utility/initialize.js +61 -0
- package/build/src/cli/utility/initialize.js.map +1 -1
- package/build/src/lib/item.d.ts.map +1 -1
- package/build/src/lib/item.js +4 -1
- package/build/src/lib/item.js.map +1 -1
- package/build/src/lib/nova-config.d.ts.map +1 -1
- package/build/src/lib/nova-config.js +4 -0
- package/build/src/lib/nova-config.js.map +1 -1
- package/build/src/lib/utility.d.ts +2 -1
- package/build/src/lib/utility.d.ts.map +1 -1
- package/build/src/lib/utility.js +15 -0
- package/build/src/lib/utility.js.map +1 -1
- package/build/src/types/cli/generate/github/workflows-blueprint.d.ts +39 -0
- package/build/src/types/cli/recipe/github/gh-precheck.d.ts +86 -0
- package/build/src/types/cli/recipe/github/sync-features.d.ts +6 -43
- package/build/src/types/cli/recipe/github/sync-identity.d.ts +6 -40
- package/build/src/types/cli/recipe/github/sync-policies.d.ts +6 -43
- package/build/src/types/cli/recipe/package-json/normalize-artifacts.d.ts +0 -9
- package/build/src/types/cli/recipe/package-json/normalize-dependencies.d.ts +0 -9
- package/build/src/types/cli/recipe/package-json/normalize-tooling.d.ts +0 -9
- package/build/src/types/cli/recipe/package-json/sync-environment.d.ts +0 -9
- package/build/src/types/cli/utility/changelog.d.ts +25 -2
- package/build/src/types/cli/utility/initialize.d.ts +53 -0
- package/build/src/types/lib/item.d.ts +1 -1
- package/build/src/types/lib/nova-config.d.ts +4 -0
- package/build/src/types/lib/utility.d.ts +9 -0
- package/build/src/types/shared.d.ts +10 -2
- package/build/src/types/tests/cli/utility/changelog.test.d.ts +179 -0
- package/build/src/types/tests/lib/item.test.d.ts +14 -0
- package/build/templates/generators/must-haves/agent-conventions/conventions/documentation.md +19 -8
- package/build/templates/scaffold/docs/docusaurus/package.json +2 -2
- package/package.json +1 -1
package/build/package.json
CHANGED
|
@@ -19,6 +19,7 @@ export declare class Runner {
|
|
|
19
19
|
static buildGithubPagesDocusaurusTarget(context: Cli_Generate_Github_WorkflowsBlueprint_Runner_BuildGithubPagesDocusaurusTarget_Context): Cli_Generate_Github_WorkflowsBlueprint_Runner_BuildGithubPagesDocusaurusTarget_Returns;
|
|
20
20
|
static buildGithubActionTarget(context: Cli_Generate_Github_WorkflowsBlueprint_Runner_BuildGithubActionTarget_Context): Cli_Generate_Github_WorkflowsBlueprint_Runner_BuildGithubActionTarget_Returns;
|
|
21
21
|
static buildVercelNextjsTarget(context: Cli_Generate_Github_WorkflowsBlueprint_Runner_BuildVercelNextjsTarget_Context): Cli_Generate_Github_WorkflowsBlueprint_Runner_BuildVercelNextjsTarget_Returns;
|
|
22
|
+
private static buildContainerRegistryTarget;
|
|
22
23
|
private static buildScopeCommand;
|
|
23
24
|
private static installPackagesRun;
|
|
24
25
|
private static removeDeprecatedNpmrcRun;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-blueprint.d.ts","sourceRoot":"","sources":["../../../../../src/cli/generate/github/workflows-blueprint.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,oEAAoE,EAEpE,wEAAwE,EAGxE,oEAAoE,EAGpE,sEAAsE,EACtE,0EAA0E,EAG1E,sEAAsE,EAGtE,gFAAgF,EAEhF,sFAAsF,EAKtF,kFAAkF,EASlF,0FAA0F,EAG1F,0FAA0F,EAK1F,kFAAkF,EAKlF,kFAAkF,
|
|
1
|
+
{"version":3,"file":"workflows-blueprint.d.ts","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AC,MAAM,CAAC,KAAK;IAkBpB,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAwBhC,OAAO,CAAC,MAAM,CAAC,0BAA0B;IA6BzC,OAAO,CAAC,MAAM,CAAC,IAAI;IA6BnB,OAAO,CAAC,MAAM,CAAC,qBAAqB;IA4CpC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IA0BlC,OAAO,CAAC,MAAM,CAAC,MAAM;IAsBrB,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAYlC"}
|
|
@@ -1105,201 +1105,60 @@ export class Runner {
|
|
|
1105
1105
|
const variables = (metadata === undefined) ? {} : metadata['variables'];
|
|
1106
1106
|
const environment = context['environment'];
|
|
1107
1107
|
const appPath = context['workingDir'];
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1108
|
+
return Runner.buildContainerRegistryTarget(context, {
|
|
1109
|
+
registrySlug: 'docker-hub',
|
|
1110
|
+
imageTagPrefix: '',
|
|
1111
|
+
loginStep: {
|
|
1112
|
+
name: 'Login to Docker Hub',
|
|
1113
|
+
uses: 'docker/login-action@v3',
|
|
1114
|
+
env: [{
|
|
1115
|
+
key: 'DOCKERHUB_TOKEN',
|
|
1116
|
+
value: Runner.resolveScopedCredExpr(variables, 'DOCKERHUB_TOKEN', targetSettings, workflowSettings, environment, appPath),
|
|
1117
|
+
}],
|
|
1118
|
+
with: [
|
|
1119
|
+
{
|
|
1120
|
+
key: 'username',
|
|
1121
|
+
value: Runner.resolveScopedCredExpr(variables, 'DOCKERHUB_USERNAME', targetSettings, workflowSettings, environment, appPath),
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
key: 'password',
|
|
1125
|
+
value: Runner.expr('env.DOCKERHUB_TOKEN'),
|
|
1126
|
+
},
|
|
1127
|
+
],
|
|
1121
1128
|
},
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
uses: 'actions/checkout@v7',
|
|
1126
|
-
},
|
|
1127
|
-
{
|
|
1128
|
-
name: 'Set up QEMU',
|
|
1129
|
-
uses: 'docker/setup-qemu-action@v3',
|
|
1130
|
-
with: [{
|
|
1131
|
-
key: 'platforms',
|
|
1132
|
-
value: 'linux/amd64,linux/arm64',
|
|
1133
|
-
}],
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
name: 'Set up Docker Buildx',
|
|
1137
|
-
uses: 'docker/setup-buildx-action@v3',
|
|
1138
|
-
},
|
|
1139
|
-
{
|
|
1140
|
-
name: 'Login to Docker Hub',
|
|
1141
|
-
uses: 'docker/login-action@v3',
|
|
1142
|
-
env: [{
|
|
1143
|
-
key: 'DOCKERHUB_TOKEN',
|
|
1144
|
-
value: Runner.resolveScopedCredExpr(variables, 'DOCKERHUB_TOKEN', targetSettings, workflowSettings, environment, appPath),
|
|
1145
|
-
}],
|
|
1146
|
-
with: [
|
|
1147
|
-
{
|
|
1148
|
-
key: 'username',
|
|
1149
|
-
value: Runner.resolveScopedCredExpr(variables, 'DOCKERHUB_USERNAME', targetSettings, workflowSettings, environment, appPath),
|
|
1150
|
-
},
|
|
1151
|
-
{
|
|
1152
|
-
key: 'password',
|
|
1153
|
-
value: Runner.expr('env.DOCKERHUB_TOKEN'),
|
|
1154
|
-
},
|
|
1155
|
-
],
|
|
1156
|
-
},
|
|
1157
|
-
{
|
|
1158
|
-
name: 'Build and push',
|
|
1159
|
-
id: 'build-push',
|
|
1160
|
-
uses: 'docker/build-push-action@v6',
|
|
1161
|
-
with: [
|
|
1162
|
-
{
|
|
1163
|
-
key: 'context',
|
|
1164
|
-
value: context['workingDir'],
|
|
1165
|
-
},
|
|
1166
|
-
{
|
|
1167
|
-
key: 'platforms',
|
|
1168
|
-
value: 'linux/amd64,linux/arm64',
|
|
1169
|
-
},
|
|
1170
|
-
{
|
|
1171
|
-
key: 'push',
|
|
1172
|
-
value: Runner.expr('env.PUBLISH'),
|
|
1173
|
-
},
|
|
1174
|
-
{
|
|
1175
|
-
key: 'tags',
|
|
1176
|
-
value: imageTags,
|
|
1177
|
-
block: true,
|
|
1178
|
-
},
|
|
1179
|
-
],
|
|
1180
|
-
},
|
|
1181
|
-
{
|
|
1182
|
-
name: 'Generate build provenance',
|
|
1183
|
-
if: Runner.expr('env.PUBLISH == \'true\''),
|
|
1184
|
-
uses: 'actions/attest-build-provenance@v2',
|
|
1185
|
-
with: [
|
|
1186
|
-
{
|
|
1187
|
-
key: 'subject-name',
|
|
1188
|
-
value: `docker.io/${Runner.expr('github.repository')}`,
|
|
1189
|
-
},
|
|
1190
|
-
{
|
|
1191
|
-
key: 'subject-digest',
|
|
1192
|
-
value: Runner.expr('steps.build-push.outputs.digest'),
|
|
1193
|
-
},
|
|
1194
|
-
{
|
|
1195
|
-
key: 'push-to-registry',
|
|
1196
|
-
value: true,
|
|
1197
|
-
},
|
|
1198
|
-
],
|
|
1199
|
-
},
|
|
1200
|
-
],
|
|
1201
|
-
};
|
|
1129
|
+
extraPermissions: {},
|
|
1130
|
+
attestationSubjectPrefix: 'docker.io/',
|
|
1131
|
+
});
|
|
1202
1132
|
}
|
|
1203
1133
|
static buildGhcrTarget(context) {
|
|
1204
1134
|
const targetSettings = context['targetSettings'];
|
|
1205
1135
|
const workflowSettings = context['workflowSettings'];
|
|
1206
1136
|
const metadata = Variables.getTargetMetadata('publish', 'ghcr');
|
|
1207
1137
|
const variables = (metadata === undefined) ? {} : metadata['variables'];
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1138
|
+
return Runner.buildContainerRegistryTarget(context, {
|
|
1139
|
+
registrySlug: 'ghcr',
|
|
1140
|
+
imageTagPrefix: 'ghcr.io/',
|
|
1141
|
+
loginStep: {
|
|
1142
|
+
name: 'Login to GitHub Container Registry',
|
|
1143
|
+
uses: 'docker/login-action@v3',
|
|
1144
|
+
with: [
|
|
1145
|
+
{
|
|
1146
|
+
key: 'registry',
|
|
1147
|
+
value: 'ghcr.io',
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
key: 'username',
|
|
1151
|
+
value: Runner.expr('github.repository_owner'),
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
key: 'password',
|
|
1155
|
+
value: Runner.resolveVariableExpr(variables, 'GITHUB_TOKEN', targetSettings, workflowSettings),
|
|
1156
|
+
},
|
|
1157
|
+
],
|
|
1222
1158
|
},
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
uses: 'actions/checkout@v7',
|
|
1227
|
-
},
|
|
1228
|
-
{
|
|
1229
|
-
name: 'Set up QEMU',
|
|
1230
|
-
uses: 'docker/setup-qemu-action@v3',
|
|
1231
|
-
with: [{
|
|
1232
|
-
key: 'platforms',
|
|
1233
|
-
value: 'linux/amd64,linux/arm64',
|
|
1234
|
-
}],
|
|
1235
|
-
},
|
|
1236
|
-
{
|
|
1237
|
-
name: 'Set up Docker Buildx',
|
|
1238
|
-
uses: 'docker/setup-buildx-action@v3',
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
name: 'Login to GitHub Container Registry',
|
|
1242
|
-
uses: 'docker/login-action@v3',
|
|
1243
|
-
with: [
|
|
1244
|
-
{
|
|
1245
|
-
key: 'registry',
|
|
1246
|
-
value: 'ghcr.io',
|
|
1247
|
-
},
|
|
1248
|
-
{
|
|
1249
|
-
key: 'username',
|
|
1250
|
-
value: Runner.expr('github.repository_owner'),
|
|
1251
|
-
},
|
|
1252
|
-
{
|
|
1253
|
-
key: 'password',
|
|
1254
|
-
value: Runner.resolveVariableExpr(variables, 'GITHUB_TOKEN', targetSettings, workflowSettings),
|
|
1255
|
-
},
|
|
1256
|
-
],
|
|
1257
|
-
},
|
|
1258
|
-
{
|
|
1259
|
-
name: 'Build and push',
|
|
1260
|
-
id: 'build-push',
|
|
1261
|
-
uses: 'docker/build-push-action@v6',
|
|
1262
|
-
with: [
|
|
1263
|
-
{
|
|
1264
|
-
key: 'context',
|
|
1265
|
-
value: context['workingDir'],
|
|
1266
|
-
},
|
|
1267
|
-
{
|
|
1268
|
-
key: 'platforms',
|
|
1269
|
-
value: 'linux/amd64,linux/arm64',
|
|
1270
|
-
},
|
|
1271
|
-
{
|
|
1272
|
-
key: 'push',
|
|
1273
|
-
value: Runner.expr('env.PUBLISH'),
|
|
1274
|
-
},
|
|
1275
|
-
{
|
|
1276
|
-
key: 'tags',
|
|
1277
|
-
value: imageTags,
|
|
1278
|
-
block: true,
|
|
1279
|
-
},
|
|
1280
|
-
],
|
|
1281
|
-
},
|
|
1282
|
-
{
|
|
1283
|
-
name: 'Generate build provenance',
|
|
1284
|
-
if: Runner.expr('env.PUBLISH == \'true\''),
|
|
1285
|
-
uses: 'actions/attest-build-provenance@v2',
|
|
1286
|
-
with: [
|
|
1287
|
-
{
|
|
1288
|
-
key: 'subject-name',
|
|
1289
|
-
value: `ghcr.io/${Runner.expr('github.repository')}`,
|
|
1290
|
-
},
|
|
1291
|
-
{
|
|
1292
|
-
key: 'subject-digest',
|
|
1293
|
-
value: Runner.expr('steps.build-push.outputs.digest'),
|
|
1294
|
-
},
|
|
1295
|
-
{
|
|
1296
|
-
key: 'push-to-registry',
|
|
1297
|
-
value: true,
|
|
1298
|
-
},
|
|
1299
|
-
],
|
|
1300
|
-
},
|
|
1301
|
-
],
|
|
1302
|
-
};
|
|
1159
|
+
extraPermissions: { 'packages': 'write' },
|
|
1160
|
+
attestationSubjectPrefix: 'ghcr.io/',
|
|
1161
|
+
});
|
|
1303
1162
|
}
|
|
1304
1163
|
static buildGithubPagesDocusaurusTarget(context) {
|
|
1305
1164
|
const targetSettings = context['targetSettings'];
|
|
@@ -1674,6 +1533,91 @@ export class Runner {
|
|
|
1674
1533
|
steps,
|
|
1675
1534
|
};
|
|
1676
1535
|
}
|
|
1536
|
+
static buildContainerRegistryTarget(context, config) {
|
|
1537
|
+
const registrySlug = config['registrySlug'];
|
|
1538
|
+
const imageTagPrefix = config['imageTagPrefix'];
|
|
1539
|
+
const loginStep = config['loginStep'];
|
|
1540
|
+
const extraPermissions = config['extraPermissions'];
|
|
1541
|
+
const attestationSubjectPrefix = config['attestationSubjectPrefix'];
|
|
1542
|
+
const imageTags = [
|
|
1543
|
+
`${imageTagPrefix}${Runner.expr('github.repository')}:latest`,
|
|
1544
|
+
`${imageTagPrefix}${Runner.expr('github.repository')}:${Runner.expr('github.event.release.tag_name || \'manual\'')}`,
|
|
1545
|
+
].join('\n');
|
|
1546
|
+
return {
|
|
1547
|
+
id: `publish-${registrySlug}-${Runner.slugifyWorkingDir(context['workingDir'])}`,
|
|
1548
|
+
needs: context['needs'],
|
|
1549
|
+
runsOn: 'ubuntu-latest',
|
|
1550
|
+
timeoutMinutes: 15,
|
|
1551
|
+
permissions: {
|
|
1552
|
+
'contents': 'read',
|
|
1553
|
+
...extraPermissions,
|
|
1554
|
+
'attestations': 'write',
|
|
1555
|
+
'id-token': 'write',
|
|
1556
|
+
},
|
|
1557
|
+
steps: [
|
|
1558
|
+
{
|
|
1559
|
+
name: 'Checkout repository',
|
|
1560
|
+
uses: 'actions/checkout@v7',
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
name: 'Set up QEMU',
|
|
1564
|
+
uses: 'docker/setup-qemu-action@v3',
|
|
1565
|
+
with: [{
|
|
1566
|
+
key: 'platforms',
|
|
1567
|
+
value: 'linux/amd64,linux/arm64',
|
|
1568
|
+
}],
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
name: 'Set up Docker Buildx',
|
|
1572
|
+
uses: 'docker/setup-buildx-action@v3',
|
|
1573
|
+
},
|
|
1574
|
+
loginStep,
|
|
1575
|
+
{
|
|
1576
|
+
name: 'Build and push',
|
|
1577
|
+
id: 'build-push',
|
|
1578
|
+
uses: 'docker/build-push-action@v6',
|
|
1579
|
+
with: [
|
|
1580
|
+
{
|
|
1581
|
+
key: 'context',
|
|
1582
|
+
value: context['workingDir'],
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
key: 'platforms',
|
|
1586
|
+
value: 'linux/amd64,linux/arm64',
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
key: 'push',
|
|
1590
|
+
value: Runner.expr('env.PUBLISH'),
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
key: 'tags',
|
|
1594
|
+
value: imageTags,
|
|
1595
|
+
block: true,
|
|
1596
|
+
},
|
|
1597
|
+
],
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
name: 'Generate build provenance',
|
|
1601
|
+
if: Runner.expr('env.PUBLISH == \'true\''),
|
|
1602
|
+
uses: 'actions/attest-build-provenance@v2',
|
|
1603
|
+
with: [
|
|
1604
|
+
{
|
|
1605
|
+
key: 'subject-name',
|
|
1606
|
+
value: `${attestationSubjectPrefix}${Runner.expr('github.repository')}`,
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
key: 'subject-digest',
|
|
1610
|
+
value: Runner.expr('steps.build-push.outputs.digest'),
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
key: 'push-to-registry',
|
|
1614
|
+
value: true,
|
|
1615
|
+
},
|
|
1616
|
+
],
|
|
1617
|
+
},
|
|
1618
|
+
],
|
|
1619
|
+
};
|
|
1620
|
+
}
|
|
1677
1621
|
static buildScopeCommand(scriptName, workspaceNames, useTurbo) {
|
|
1678
1622
|
if (useTurbo === true) {
|
|
1679
1623
|
const turboFlags = workspaceNames.map((name) => `--filter=${name}`);
|