@happyvertical/smrt-projects 0.60.15 → 0.60.17
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/AGENTS.md +3 -1
- package/dist/chunks/{Issue-DgcFTkMw.js → Issue-CaSl5aDc.js} +2 -2
- package/dist/chunks/{Issue-DgcFTkMw.js.map → Issue-CaSl5aDc.js.map} +1 -1
- package/dist/chunks/{PullRequest-CXLB1StU.js → PullRequest-CwT0TlLk.js} +2 -2
- package/dist/chunks/{PullRequest-CXLB1StU.js.map → PullRequest-CwT0TlLk.js.map} +1 -1
- package/dist/collections/Repositories.d.ts +22 -0
- package/dist/collections/Repositories.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +225 -10
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +234 -5
- package/dist/models/Issue.d.ts.map +1 -1
- package/dist/models/Repository.d.ts +56 -1
- package/dist/models/Repository.d.ts.map +1 -1
- package/dist/repository-token.d.ts +18 -0
- package/dist/repository-token.d.ts.map +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/repository-organization-sync.d.ts +118 -0
- package/dist/services/repository-organization-sync.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +104 -6
- package/dist/smrt-knowledge.okf.md +2 -2
- package/dist/svelte/AssistanceLauncher.svelte +23 -13
- package/dist/svelte/DeliveryStatus.svelte +23 -13
- package/dist/svelte/DevelopmentBoard.svelte +10 -4
- package/dist/svelte/DevelopmentRequestDetail.svelte +15 -9
- package/dist/svelte/PreviewApprovalPanel.svelte +16 -10
- package/dist/svelte/ProjectBoard.svelte +4 -0
- package/dist/svelte/ProjectInterview.svelte +123 -37
- package/dist/svelte/ProjectQuestionsAndDecisions.svelte +128 -35
- package/dist/svelte/ServiceEvidenceList.svelte +35 -23
- package/dist/svelte/components/ApprovalActions.svelte +15 -13
- package/dist/svelte/components/BulkActions.svelte +40 -37
- package/dist/svelte/components/DevelopmentRequestForm.svelte +37 -6
- package/dist/svelte/components/DevelopmentRequestList.svelte +68 -69
- package/dist/svelte/components/RejectDialog.svelte +54 -45
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +18 -18
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-projects",
|
|
5
|
-
"packageVersion": "0.60.
|
|
5
|
+
"packageVersion": "0.60.17",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-projects:CommentCollection": {
|
|
8
8
|
"name": "commentcollection",
|
|
@@ -3199,6 +3199,38 @@
|
|
|
3199
3199
|
"isStatic": false,
|
|
3200
3200
|
"isPublic": true
|
|
3201
3201
|
},
|
|
3202
|
+
"syncOrganization": {
|
|
3203
|
+
"name": "syncOrganization",
|
|
3204
|
+
"async": true,
|
|
3205
|
+
"parameters": [
|
|
3206
|
+
{
|
|
3207
|
+
"name": "options",
|
|
3208
|
+
"type": "SyncOrganizationOptions",
|
|
3209
|
+
"optional": false
|
|
3210
|
+
}
|
|
3211
|
+
],
|
|
3212
|
+
"returnType": "Promise<SyncOrganizationResult>",
|
|
3213
|
+
"isStatic": false,
|
|
3214
|
+
"isPublic": true
|
|
3215
|
+
},
|
|
3216
|
+
"listActive": {
|
|
3217
|
+
"name": "listActive",
|
|
3218
|
+
"async": true,
|
|
3219
|
+
"parameters": [
|
|
3220
|
+
{
|
|
3221
|
+
"name": "options",
|
|
3222
|
+
"type": "object",
|
|
3223
|
+
"optional": true,
|
|
3224
|
+
"memberTypes": [
|
|
3225
|
+
"boolean",
|
|
3226
|
+
"string"
|
|
3227
|
+
]
|
|
3228
|
+
}
|
|
3229
|
+
],
|
|
3230
|
+
"returnType": "Promise<Repository[]>",
|
|
3231
|
+
"isStatic": false,
|
|
3232
|
+
"isPublic": true
|
|
3233
|
+
},
|
|
3202
3234
|
"findWithOpenIssues": {
|
|
3203
3235
|
"name": "findWithOpenIssues",
|
|
3204
3236
|
"async": true,
|
|
@@ -3280,7 +3312,7 @@
|
|
|
3280
3312
|
],
|
|
3281
3313
|
"schema": {
|
|
3282
3314
|
"tableName": "repositories",
|
|
3283
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"repositories\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"owner\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"full_name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"default_branch\" TEXT DEFAULT 'main',\n \"is_private\" BOOLEAN DEFAULT FALSE,\n \"provider_type\" TEXT DEFAULT 'github',\n \"base_url\" TEXT DEFAULT '',\n \"token_config_key\" TEXT DEFAULT 'GITHUB_TOKEN',\n \"last_synced_at\" TIMESTAMP\n);",
|
|
3315
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"repositories\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"owner\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"full_name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"default_branch\" TEXT DEFAULT 'main',\n \"is_private\" BOOLEAN DEFAULT FALSE,\n \"provider_type\" TEXT DEFAULT 'github',\n \"base_url\" TEXT DEFAULT '',\n \"token_config_key\" TEXT DEFAULT 'GITHUB_TOKEN',\n \"last_synced_at\" TIMESTAMP,\n \"url\" TEXT DEFAULT '',\n \"archived\" BOOLEAN DEFAULT FALSE,\n \"last_pushed_at\" TIMESTAMP,\n \"open_pull_request_count\" INTEGER DEFAULT 0,\n \"ci_state\" TEXT DEFAULT 'unknown',\n \"latest_release_tag\" TEXT DEFAULT '',\n \"latest_release_date\" TIMESTAMP,\n \"latest_release_url\" TEXT DEFAULT '',\n \"last_observed_at\" TIMESTAMP,\n \"missing_since\" TIMESTAMP\n);",
|
|
3284
3316
|
"columns": {
|
|
3285
3317
|
"_sync_origin_device_id": {
|
|
3286
3318
|
"type": "TEXT"
|
|
@@ -3377,6 +3409,62 @@
|
|
|
3377
3409
|
"type": "TIMESTAMP",
|
|
3378
3410
|
"notNull": false,
|
|
3379
3411
|
"unique": false
|
|
3412
|
+
},
|
|
3413
|
+
"url": {
|
|
3414
|
+
"type": "TEXT",
|
|
3415
|
+
"notNull": false,
|
|
3416
|
+
"unique": false,
|
|
3417
|
+
"default": ""
|
|
3418
|
+
},
|
|
3419
|
+
"archived": {
|
|
3420
|
+
"type": "BOOLEAN",
|
|
3421
|
+
"notNull": false,
|
|
3422
|
+
"unique": false,
|
|
3423
|
+
"default": false
|
|
3424
|
+
},
|
|
3425
|
+
"last_pushed_at": {
|
|
3426
|
+
"type": "TIMESTAMP",
|
|
3427
|
+
"notNull": false,
|
|
3428
|
+
"unique": false
|
|
3429
|
+
},
|
|
3430
|
+
"open_pull_request_count": {
|
|
3431
|
+
"type": "INTEGER",
|
|
3432
|
+
"notNull": false,
|
|
3433
|
+
"unique": false,
|
|
3434
|
+
"default": 0
|
|
3435
|
+
},
|
|
3436
|
+
"ci_state": {
|
|
3437
|
+
"type": "TEXT",
|
|
3438
|
+
"notNull": false,
|
|
3439
|
+
"unique": false,
|
|
3440
|
+
"default": "unknown"
|
|
3441
|
+
},
|
|
3442
|
+
"latest_release_tag": {
|
|
3443
|
+
"type": "TEXT",
|
|
3444
|
+
"notNull": false,
|
|
3445
|
+
"unique": false,
|
|
3446
|
+
"default": ""
|
|
3447
|
+
},
|
|
3448
|
+
"latest_release_date": {
|
|
3449
|
+
"type": "TIMESTAMP",
|
|
3450
|
+
"notNull": false,
|
|
3451
|
+
"unique": false
|
|
3452
|
+
},
|
|
3453
|
+
"latest_release_url": {
|
|
3454
|
+
"type": "TEXT",
|
|
3455
|
+
"notNull": false,
|
|
3456
|
+
"unique": false,
|
|
3457
|
+
"default": ""
|
|
3458
|
+
},
|
|
3459
|
+
"last_observed_at": {
|
|
3460
|
+
"type": "TIMESTAMP",
|
|
3461
|
+
"notNull": false,
|
|
3462
|
+
"unique": false
|
|
3463
|
+
},
|
|
3464
|
+
"missing_since": {
|
|
3465
|
+
"type": "TIMESTAMP",
|
|
3466
|
+
"notNull": false,
|
|
3467
|
+
"unique": false
|
|
3380
3468
|
}
|
|
3381
3469
|
},
|
|
3382
3470
|
"indexes": [
|
|
@@ -3390,6 +3478,16 @@
|
|
|
3390
3478
|
"unique": true,
|
|
3391
3479
|
"nullsNotDistinct": true
|
|
3392
3480
|
},
|
|
3481
|
+
{
|
|
3482
|
+
"name": "repositories_tenant_provider_owner_name_key",
|
|
3483
|
+
"columns": [
|
|
3484
|
+
"tenant_id",
|
|
3485
|
+
"provider_type",
|
|
3486
|
+
"owner",
|
|
3487
|
+
"name"
|
|
3488
|
+
],
|
|
3489
|
+
"unique": true
|
|
3490
|
+
},
|
|
3393
3491
|
{
|
|
3394
3492
|
"name": "repositories_tenant_id_created_at_idx",
|
|
3395
3493
|
"columns": [
|
|
@@ -3398,7 +3496,7 @@
|
|
|
3398
3496
|
]
|
|
3399
3497
|
}
|
|
3400
3498
|
],
|
|
3401
|
-
"version": "
|
|
3499
|
+
"version": "a26f3c76"
|
|
3402
3500
|
},
|
|
3403
3501
|
"importPath": "@happyvertical/smrt-projects"
|
|
3404
3502
|
},
|
|
@@ -8282,6 +8380,59 @@
|
|
|
8282
8380
|
"lastSyncedAt": {
|
|
8283
8381
|
"type": "datetime",
|
|
8284
8382
|
"required": false
|
|
8383
|
+
},
|
|
8384
|
+
"url": {
|
|
8385
|
+
"type": "text",
|
|
8386
|
+
"required": false,
|
|
8387
|
+
"default": ""
|
|
8388
|
+
},
|
|
8389
|
+
"archived": {
|
|
8390
|
+
"type": "boolean",
|
|
8391
|
+
"required": false,
|
|
8392
|
+
"default": false
|
|
8393
|
+
},
|
|
8394
|
+
"lastPushedAt": {
|
|
8395
|
+
"type": "datetime",
|
|
8396
|
+
"required": false
|
|
8397
|
+
},
|
|
8398
|
+
"openPullRequestCount": {
|
|
8399
|
+
"type": "integer",
|
|
8400
|
+
"required": false,
|
|
8401
|
+
"default": 0
|
|
8402
|
+
},
|
|
8403
|
+
"ciState": {
|
|
8404
|
+
"type": "text",
|
|
8405
|
+
"required": false,
|
|
8406
|
+
"default": "unknown",
|
|
8407
|
+
"enum": [
|
|
8408
|
+
"success",
|
|
8409
|
+
"failure",
|
|
8410
|
+
"pending",
|
|
8411
|
+
"none",
|
|
8412
|
+
"unknown"
|
|
8413
|
+
]
|
|
8414
|
+
},
|
|
8415
|
+
"latestReleaseTag": {
|
|
8416
|
+
"type": "text",
|
|
8417
|
+
"required": false,
|
|
8418
|
+
"default": ""
|
|
8419
|
+
},
|
|
8420
|
+
"latestReleaseDate": {
|
|
8421
|
+
"type": "datetime",
|
|
8422
|
+
"required": false
|
|
8423
|
+
},
|
|
8424
|
+
"latestReleaseUrl": {
|
|
8425
|
+
"type": "text",
|
|
8426
|
+
"required": false,
|
|
8427
|
+
"default": ""
|
|
8428
|
+
},
|
|
8429
|
+
"lastObservedAt": {
|
|
8430
|
+
"type": "datetime",
|
|
8431
|
+
"required": false
|
|
8432
|
+
},
|
|
8433
|
+
"missingSince": {
|
|
8434
|
+
"type": "datetime",
|
|
8435
|
+
"required": false
|
|
8285
8436
|
}
|
|
8286
8437
|
},
|
|
8287
8438
|
"methods": {
|
|
@@ -8443,6 +8594,18 @@
|
|
|
8443
8594
|
],
|
|
8444
8595
|
"skipApiCheck": true
|
|
8445
8596
|
},
|
|
8597
|
+
"indexes": [
|
|
8598
|
+
{
|
|
8599
|
+
"name": "repositories_tenant_provider_owner_name_key",
|
|
8600
|
+
"columns": [
|
|
8601
|
+
"tenantId",
|
|
8602
|
+
"providerType",
|
|
8603
|
+
"owner",
|
|
8604
|
+
"name"
|
|
8605
|
+
],
|
|
8606
|
+
"unique": true
|
|
8607
|
+
}
|
|
8608
|
+
],
|
|
8446
8609
|
"tenantScoped": {
|
|
8447
8610
|
"mode": "optional"
|
|
8448
8611
|
},
|
|
@@ -8458,7 +8621,7 @@
|
|
|
8458
8621
|
"displayLabelField": "name",
|
|
8459
8622
|
"schema": {
|
|
8460
8623
|
"tableName": "repositories",
|
|
8461
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"repositories\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"owner\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"full_name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"default_branch\" TEXT DEFAULT 'main',\n \"is_private\" BOOLEAN DEFAULT FALSE,\n \"provider_type\" TEXT DEFAULT 'github',\n \"base_url\" TEXT DEFAULT '',\n \"token_config_key\" TEXT DEFAULT 'GITHUB_TOKEN',\n \"last_synced_at\" TIMESTAMP\n);",
|
|
8624
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"repositories\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"owner\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"full_name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"default_branch\" TEXT DEFAULT 'main',\n \"is_private\" BOOLEAN DEFAULT FALSE,\n \"provider_type\" TEXT DEFAULT 'github',\n \"base_url\" TEXT DEFAULT '',\n \"token_config_key\" TEXT DEFAULT 'GITHUB_TOKEN',\n \"last_synced_at\" TIMESTAMP,\n \"url\" TEXT DEFAULT '',\n \"archived\" BOOLEAN DEFAULT FALSE,\n \"last_pushed_at\" TIMESTAMP,\n \"open_pull_request_count\" INTEGER DEFAULT 0,\n \"ci_state\" TEXT DEFAULT 'unknown',\n \"latest_release_tag\" TEXT DEFAULT '',\n \"latest_release_date\" TIMESTAMP,\n \"latest_release_url\" TEXT DEFAULT '',\n \"last_observed_at\" TIMESTAMP,\n \"missing_since\" TIMESTAMP\n);",
|
|
8462
8625
|
"columns": {
|
|
8463
8626
|
"_sync_origin_device_id": {
|
|
8464
8627
|
"type": "TEXT"
|
|
@@ -8555,6 +8718,62 @@
|
|
|
8555
8718
|
"type": "TIMESTAMP",
|
|
8556
8719
|
"notNull": false,
|
|
8557
8720
|
"unique": false
|
|
8721
|
+
},
|
|
8722
|
+
"url": {
|
|
8723
|
+
"type": "TEXT",
|
|
8724
|
+
"notNull": false,
|
|
8725
|
+
"unique": false,
|
|
8726
|
+
"default": ""
|
|
8727
|
+
},
|
|
8728
|
+
"archived": {
|
|
8729
|
+
"type": "BOOLEAN",
|
|
8730
|
+
"notNull": false,
|
|
8731
|
+
"unique": false,
|
|
8732
|
+
"default": false
|
|
8733
|
+
},
|
|
8734
|
+
"last_pushed_at": {
|
|
8735
|
+
"type": "TIMESTAMP",
|
|
8736
|
+
"notNull": false,
|
|
8737
|
+
"unique": false
|
|
8738
|
+
},
|
|
8739
|
+
"open_pull_request_count": {
|
|
8740
|
+
"type": "INTEGER",
|
|
8741
|
+
"notNull": false,
|
|
8742
|
+
"unique": false,
|
|
8743
|
+
"default": 0
|
|
8744
|
+
},
|
|
8745
|
+
"ci_state": {
|
|
8746
|
+
"type": "TEXT",
|
|
8747
|
+
"notNull": false,
|
|
8748
|
+
"unique": false,
|
|
8749
|
+
"default": "unknown"
|
|
8750
|
+
},
|
|
8751
|
+
"latest_release_tag": {
|
|
8752
|
+
"type": "TEXT",
|
|
8753
|
+
"notNull": false,
|
|
8754
|
+
"unique": false,
|
|
8755
|
+
"default": ""
|
|
8756
|
+
},
|
|
8757
|
+
"latest_release_date": {
|
|
8758
|
+
"type": "TIMESTAMP",
|
|
8759
|
+
"notNull": false,
|
|
8760
|
+
"unique": false
|
|
8761
|
+
},
|
|
8762
|
+
"latest_release_url": {
|
|
8763
|
+
"type": "TEXT",
|
|
8764
|
+
"notNull": false,
|
|
8765
|
+
"unique": false,
|
|
8766
|
+
"default": ""
|
|
8767
|
+
},
|
|
8768
|
+
"last_observed_at": {
|
|
8769
|
+
"type": "TIMESTAMP",
|
|
8770
|
+
"notNull": false,
|
|
8771
|
+
"unique": false
|
|
8772
|
+
},
|
|
8773
|
+
"missing_since": {
|
|
8774
|
+
"type": "TIMESTAMP",
|
|
8775
|
+
"notNull": false,
|
|
8776
|
+
"unique": false
|
|
8558
8777
|
}
|
|
8559
8778
|
},
|
|
8560
8779
|
"indexes": [
|
|
@@ -8568,6 +8787,16 @@
|
|
|
8568
8787
|
"unique": true,
|
|
8569
8788
|
"nullsNotDistinct": true
|
|
8570
8789
|
},
|
|
8790
|
+
{
|
|
8791
|
+
"name": "repositories_tenant_provider_owner_name_key",
|
|
8792
|
+
"columns": [
|
|
8793
|
+
"tenant_id",
|
|
8794
|
+
"provider_type",
|
|
8795
|
+
"owner",
|
|
8796
|
+
"name"
|
|
8797
|
+
],
|
|
8798
|
+
"unique": true
|
|
8799
|
+
},
|
|
8571
8800
|
{
|
|
8572
8801
|
"name": "repositories_tenant_id_created_at_idx",
|
|
8573
8802
|
"columns": [
|
|
@@ -8576,7 +8805,7 @@
|
|
|
8576
8805
|
]
|
|
8577
8806
|
}
|
|
8578
8807
|
],
|
|
8579
|
-
"version": "
|
|
8808
|
+
"version": "a26f3c76"
|
|
8580
8809
|
},
|
|
8581
8810
|
"importPath": "@happyvertical/smrt-projects"
|
|
8582
8811
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Issue.d.ts","sourceRoot":"","sources":["../../src/models/Issue.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAIL,UAAU,EACV,KAAK,iBAAiB,EAGvB,MAAM,0BAA0B,CAAC;AAUlC,OAAO,KAAK,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,WAAW,EAEX,WAAW,EACZ,MAAM,aAAU,CAAC;AAClB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAW,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC;AAuB/C,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iEAAiE;AACjE,MAAM,MAAM,4BAA4B,GAAG,CACzC,KAAK,EAAE,KAAK,KAEV,SAAS,yBAAyB,EAAE,GACpC,SAAS,GACT,OAAO,CAAC,SAAS,yBAAyB,EAAE,GAAG,SAAS,CAAC,CAAC;AAE9D,uDAAuD;AACvD,MAAM,MAAM,oBAAoB,GAC5B,SAAS,yBAAyB,EAAE,GACpC,4BAA4B,CAAC;AAkDjC,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC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,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAkChE;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAUrC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAMrC;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;IAM1C;;;;;;;;;;;OAWG;IACG,aAAa,CAAC,UAAU,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAwDzE,2DAA2D;YAC7C,yBAAyB;IAiBvC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAU5B;;;;OAIG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAShD;;;;OAIG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/C;;;;OAIG;IACG,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAShD;;OAEG;IACH,MAAM,IAAI,MAAM;CAOjB"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Uses @happyvertical/repos SDK for actual API calls.
|
|
6
6
|
*/
|
|
7
7
|
import { SmrtObject, type SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
8
|
-
import type { CreateIssueInput, CreatePRInput, IRepository, RepositoryProviderType, SearchFilters, SyncOptions } from "../types.js";
|
|
8
|
+
import type { CreateIssueInput, CreatePRInput, IRepository, RepositoryCiState, RepositoryProviderType, SearchFilters, SyncOptions } from "../types.js";
|
|
9
9
|
import type { Issue } from "./Issue.js";
|
|
10
10
|
import type { PullRequest } from "./PullRequest.js";
|
|
11
11
|
export interface RepositoryOptions extends SmrtObjectOptions {
|
|
@@ -19,6 +19,16 @@ export interface RepositoryOptions extends SmrtObjectOptions {
|
|
|
19
19
|
baseUrl?: string;
|
|
20
20
|
tokenConfigKey?: string;
|
|
21
21
|
tenantId?: string | null;
|
|
22
|
+
url?: string;
|
|
23
|
+
archived?: boolean;
|
|
24
|
+
lastPushedAt?: Date | null;
|
|
25
|
+
openPullRequestCount?: number;
|
|
26
|
+
ciState?: RepositoryCiState;
|
|
27
|
+
latestReleaseTag?: string;
|
|
28
|
+
latestReleaseDate?: Date | null;
|
|
29
|
+
latestReleaseUrl?: string;
|
|
30
|
+
lastObservedAt?: Date | null;
|
|
31
|
+
missingSince?: Date | null;
|
|
22
32
|
}
|
|
23
33
|
export declare class Repository extends SmrtObject {
|
|
24
34
|
/**
|
|
@@ -66,6 +76,51 @@ export declare class Repository extends SmrtObject {
|
|
|
66
76
|
* Last sync timestamp
|
|
67
77
|
*/
|
|
68
78
|
lastSyncedAt: Date | null;
|
|
79
|
+
/**
|
|
80
|
+
* Web URL of the repository on the provider (set by organization sync)
|
|
81
|
+
*/
|
|
82
|
+
url: string;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the provider reports the repository as archived. Consumers hide
|
|
85
|
+
* archived repositories by default.
|
|
86
|
+
*/
|
|
87
|
+
archived: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Time of the last push, or null when never pushed / not yet observed
|
|
90
|
+
*/
|
|
91
|
+
lastPushedAt: Date | null;
|
|
92
|
+
/**
|
|
93
|
+
* Open pull request count at the last observation
|
|
94
|
+
*/
|
|
95
|
+
openPullRequestCount: number;
|
|
96
|
+
/**
|
|
97
|
+
* Rolled-up CI state of the default-branch head commit. 'unknown' until
|
|
98
|
+
* the first organization sync observes the repository.
|
|
99
|
+
*/
|
|
100
|
+
ciState: RepositoryCiState;
|
|
101
|
+
/**
|
|
102
|
+
* Tag of the latest release, or empty when the repository has none
|
|
103
|
+
*/
|
|
104
|
+
latestReleaseTag: string;
|
|
105
|
+
/**
|
|
106
|
+
* Publication time of the latest release
|
|
107
|
+
*/
|
|
108
|
+
latestReleaseDate: Date | null;
|
|
109
|
+
/**
|
|
110
|
+
* Web URL of the latest release, or empty
|
|
111
|
+
*/
|
|
112
|
+
latestReleaseUrl: string;
|
|
113
|
+
/**
|
|
114
|
+
* Last time an organization sync saw this repository in the provider
|
|
115
|
+
* listing. Drives the organization-sync throttle.
|
|
116
|
+
*/
|
|
117
|
+
lastObservedAt: Date | null;
|
|
118
|
+
/**
|
|
119
|
+
* Set when an organization sync no longer lists the repository (deleted,
|
|
120
|
+
* transferred, or access lost); cleared when it reappears. Rows are kept so
|
|
121
|
+
* links and history survive.
|
|
122
|
+
*/
|
|
123
|
+
missingSince: Date | null;
|
|
69
124
|
/**
|
|
70
125
|
* Transient: Cached repository client (not persisted)
|
|
71
126
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Repository.d.ts","sourceRoot":"","sources":["../../src/models/Repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"Repository.d.ts","sourceRoot":"","sources":["../../src/models/Repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,EAGvB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EAEtB,aAAa,EACb,WAAW,EACZ,MAAM,aAAU,CAAC;AAClB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAe,CAAC;AAEjD,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,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AAC;IAW1C;;;;;;;OAOG;WACU,aAAa,CACxB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;CAO9B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token resolution for repository providers.
|
|
3
|
+
*
|
|
4
|
+
* Only the config key is persisted on a Repository; the secret itself is read
|
|
5
|
+
* from the environment or module config at call time.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Resolve a provider token from `tokenConfigKey`.
|
|
9
|
+
*
|
|
10
|
+
* Order: environment variable of that name, then the `smrt-projects` module
|
|
11
|
+
* config entry of that name.
|
|
12
|
+
*
|
|
13
|
+
* @param tokenConfigKey - Environment variable name or module config key
|
|
14
|
+
* @returns The token
|
|
15
|
+
* @throws Error when no token is configured under that key
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveRepositoryToken(tokenConfigKey: string): string;
|
|
18
|
+
//# sourceMappingURL=repository-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-token.d.ts","sourceRoot":"","sources":["../src/repository-token.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAarE"}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './participant-development-request-service.js';
|
|
|
5
5
|
export * from './project-board-service.js';
|
|
6
6
|
export * from './project-governance-service.js';
|
|
7
7
|
export * from './project-specification-service.js';
|
|
8
|
+
export * from './repository-organization-sync.js';
|
|
8
9
|
export * from './service-evidence-service.js';
|
|
9
10
|
export * from './subscription-commercial-resolver.js';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Organization-wide repository sync.
|
|
3
|
+
*
|
|
4
|
+
* Lists every repository of an owner through `@happyvertical/repos`, upserts
|
|
5
|
+
* one tenant-scoped `Repository` row per listed repository, carries the
|
|
6
|
+
* archived flag and the activity snapshot, and marks rows the provider no
|
|
7
|
+
* longer lists. Idempotent, throttled, and safe for a scheduled job: it opens
|
|
8
|
+
* no transaction (a nested `transaction()` takes a new pooled connection, not
|
|
9
|
+
* a savepoint), so a failure leaves earlier rows saved and a rerun converges.
|
|
10
|
+
*/
|
|
11
|
+
import type { RepositoryCollection } from "../collections/Repositories.js";
|
|
12
|
+
import type { RepositoryProviderType } from "../types.js";
|
|
13
|
+
/** Latest release as reported by the organization listing. */
|
|
14
|
+
export interface OrganizationRepositoryRelease {
|
|
15
|
+
tag: string;
|
|
16
|
+
publishedAt: string | null;
|
|
17
|
+
url: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* One repository of an organization listing. Structurally compatible with
|
|
21
|
+
* `GitHubRepositorySummary` from `@happyvertical/repos`.
|
|
22
|
+
*/
|
|
23
|
+
export interface OrganizationRepositorySummary {
|
|
24
|
+
owner: string;
|
|
25
|
+
name: string;
|
|
26
|
+
description: string | null;
|
|
27
|
+
defaultBranch: string | null;
|
|
28
|
+
url: string;
|
|
29
|
+
isPrivate: boolean;
|
|
30
|
+
archived: boolean;
|
|
31
|
+
pushedAt: string | null;
|
|
32
|
+
openPullRequestCount: number;
|
|
33
|
+
latestRelease: OrganizationRepositoryRelease | null;
|
|
34
|
+
ciState: 'success' | 'failure' | 'pending' | 'none';
|
|
35
|
+
}
|
|
36
|
+
/** Input handed to an {@link OrganizationRepositoryLister}. */
|
|
37
|
+
export interface OrganizationRepositoryListInput {
|
|
38
|
+
owner: string;
|
|
39
|
+
/** Resolved read-only token. */
|
|
40
|
+
token: string;
|
|
41
|
+
baseUrl?: string;
|
|
42
|
+
signal?: AbortSignal;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Lists the repositories of an organization. The default implementation is
|
|
46
|
+
* `listOrganizationRepositories` from `@happyvertical/repos`; tests and
|
|
47
|
+
* alternative providers inject their own.
|
|
48
|
+
*/
|
|
49
|
+
export type OrganizationRepositoryLister = (input: OrganizationRepositoryListInput) => Promise<{
|
|
50
|
+
repositories: OrganizationRepositorySummary[];
|
|
51
|
+
}>;
|
|
52
|
+
/** Options for {@link syncOrganizationRepositories}. */
|
|
53
|
+
export interface SyncOrganizationOptions {
|
|
54
|
+
/** Organization (or user) login to list. */
|
|
55
|
+
owner: string;
|
|
56
|
+
/** Env var / module config key holding a read-only token. Default `GITHUB_TOKEN`. */
|
|
57
|
+
tokenConfigKey?: string;
|
|
58
|
+
/** Provider. Organization listing is implemented for `github`. */
|
|
59
|
+
providerType?: RepositoryProviderType;
|
|
60
|
+
/** API base URL for self-hosted providers. */
|
|
61
|
+
baseUrl?: string;
|
|
62
|
+
/** Run inside this tenant's context. Defaults to the ambient context. */
|
|
63
|
+
tenantId?: string;
|
|
64
|
+
/** Ignore the {@link SYNC_THROTTLE_MS} throttle. */
|
|
65
|
+
force?: boolean;
|
|
66
|
+
/** Throttle window in ms. Defaults to {@link SYNC_THROTTLE_MS}. */
|
|
67
|
+
throttleMs?: number;
|
|
68
|
+
/** Lister override (tests, alternative providers). */
|
|
69
|
+
lister?: OrganizationRepositoryLister;
|
|
70
|
+
/** Clock override for tests. */
|
|
71
|
+
now?: () => Date;
|
|
72
|
+
signal?: AbortSignal;
|
|
73
|
+
}
|
|
74
|
+
/** Outcome of one organization sync. */
|
|
75
|
+
export interface SyncOrganizationResult {
|
|
76
|
+
owner: string;
|
|
77
|
+
/** True when no listing was made. */
|
|
78
|
+
skipped: boolean;
|
|
79
|
+
/** Why nothing was listed, or why vanish detection was withheld. */
|
|
80
|
+
reason?: 'throttled' | 'empty-listing';
|
|
81
|
+
/** Repositories in the provider listing. */
|
|
82
|
+
listed: number;
|
|
83
|
+
created: number;
|
|
84
|
+
updated: number;
|
|
85
|
+
/** Listed repositories currently archived. */
|
|
86
|
+
archived: number;
|
|
87
|
+
/** Rows newly marked missing by this run. */
|
|
88
|
+
vanished: number;
|
|
89
|
+
/** Rows that were missing and are listed again. */
|
|
90
|
+
restored: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Default lister: `listOrganizationRepositories` from `@happyvertical/repos`
|
|
94
|
+
* (released in 0.111.11). Resolved lazily so older SDKs fail with a clear
|
|
95
|
+
* message instead of an import error.
|
|
96
|
+
*/
|
|
97
|
+
export declare const defaultOrganizationRepositoryLister: OrganizationRepositoryLister;
|
|
98
|
+
/**
|
|
99
|
+
* Sync every repository of an organization into `Repository` rows.
|
|
100
|
+
*
|
|
101
|
+
* - Upserts by (tenant, provider, owner, name); a rerun with an unchanged
|
|
102
|
+
* listing creates nothing.
|
|
103
|
+
* - Sets `archived` and the activity snapshot from the listing.
|
|
104
|
+
* - Rows of the same owner that the listing no longer contains get
|
|
105
|
+
* `missingSince`; they come back (cleared) if listed again. Repositories of
|
|
106
|
+
* other owners (added by name) are never touched. Vanish detection is
|
|
107
|
+
* withheld when the listing is empty, since that usually means lost access.
|
|
108
|
+
* - Throttled by `lastObservedAt` once a pass has completed; a pass that
|
|
109
|
+
* failed midway is retried immediately.
|
|
110
|
+
* - Scoped to the ambient tenant (or `tenantId`); with no tenant context only
|
|
111
|
+
* global (null-tenant) rows are read or written.
|
|
112
|
+
* - Owner and name match case-insensitively; stored casing follows the provider.
|
|
113
|
+
*
|
|
114
|
+
* @param collection - Repository collection (tenant scope comes from context)
|
|
115
|
+
* @param options - See {@link SyncOrganizationOptions}
|
|
116
|
+
*/
|
|
117
|
+
export declare function syncOrganizationRepositories(collection: RepositoryCollection, options: SyncOrganizationOptions): Promise<SyncOrganizationResult>;
|
|
118
|
+
//# sourceMappingURL=repository-organization-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-organization-sync.d.ts","sourceRoot":"","sources":["../../src/services/repository-organization-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAA6B,CAAC;AAIxE,OAAO,KAAK,EAAqB,sBAAsB,EAAE,MAAM,aAAU,CAAC;AAE1E,8DAA8D;AAC9D,MAAM,WAAW,6BAA6B;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,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