@onereach/idw-init-account-resources 0.12.1 → 0.12.3

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.
@@ -1,5 +1,5 @@
1
1
   WARN  Issue while reading "/builds/onereach/platform/idw/idw-template/.npmrc". Failed to replace env in config: ${OR_NPM_TOKEN}
2
2
 
3
- > @onereach/idw-init-account-resources@0.12.0 build /builds/onereach/platform/idw/idw-template/packages/init/idw-init-account-resources
3
+ > @onereach/idw-init-account-resources@0.12.2 build /builds/onereach/platform/idw/idw-template/packages/init/idw-init-account-resources
4
4
  > rimraf dist && tsc -b && mkdir dist/assets/skills/documentation && cp -r src/assets/skills/documentation/* dist/assets/skills/documentation
5
5
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @onereach/idw-init-account-resources
2
2
 
3
+ ## 0.12.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 17f2f29: sync feed, knowledge, skills, domains to graph db
8
+
9
+ ## 0.12.2
10
+
11
+ ### Patch Changes
12
+
13
+ - a5d2d17: fix dist build
14
+
3
15
  ## 0.12.1
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ var idw_1 = require("@or-sdk/idw");
40
+ module.exports = {
41
+ up: function (queryInterface) {
42
+ return __awaiter(this, void 0, void 0, function () {
43
+ var idwApiV2;
44
+ return __generator(this, function (_a) {
45
+ switch (_a.label) {
46
+ case 0:
47
+ idwApiV2 = new idw_1.IdwApiV2({
48
+ idwApiUrl: queryInterface.context.discoveryUrl.replace('discovery', 'idw'),
49
+ token: queryInterface.context._orToken,
50
+ });
51
+ return [4, idwApiV2.syncGraph()];
52
+ case 1:
53
+ _a.sent();
54
+ return [2];
55
+ }
56
+ });
57
+ });
58
+ },
59
+ down: function () {
60
+ return __awaiter(this, void 0, void 0, function () {
61
+ return __generator(this, function (_a) {
62
+ return [2];
63
+ });
64
+ });
65
+ },
66
+ };
67
+ //# sourceMappingURL=20250321102618-sync-graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20250321102618-sync-graph.js","sourceRoot":"","sources":["../../../src/assets/db_migrations/20250321102618-sync-graph.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,mCAAuC;AAKvC,MAAM,CAAC,OAAO,GAAG;IACT,EAAE,YAAC,cAA+G;;;;;;wBAChH,QAAQ,GAAG,IAAI,cAAQ,CAAC;4BAC5B,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC;4BAC1E,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,QAAQ;yBACvC,CAAC,CAAC;wBACH,WAAM,QAAQ,CAAC,SAAS,EAAE,EAAA;;wBAA1B,SAA0B,CAAC;;;;;KAO5B;IAEK,IAAI;;;;;;KAOT;CACF,CAAC"}
@@ -59,8 +59,8 @@ var InitFilesResources = (function () {
59
59
  return __generator(this, function (_a) {
60
60
  switch (_a.label) {
61
61
  case 0:
62
- relativePath = 'src/assets/skills/documentation';
63
- files = fs_1.default.readdirSync(path_1.default.resolve(relativePath));
62
+ relativePath = path_1.default.resolve(__dirname, '../assets/skills/documentation');
63
+ files = fs_1.default.readdirSync(relativePath);
64
64
  result = {};
65
65
  _i = 0, files_2 = files;
66
66
  _a.label = 1;
@@ -75,6 +75,7 @@ var InitFilesResources = (function () {
75
75
  fileModel: fileData,
76
76
  isPublic: true,
77
77
  prefix: 'IDW/docs/',
78
+ rewriteMode: 'rewrite',
78
79
  })];
79
80
  case 2:
80
81
  url = _a.sent();
@@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AAE,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;;;wBAbtB,IAAK,CAAA;;4BAgBxB,WAAO,MAAM,EAAC;;;;KACf;IACH,yBAAC;AAAD,CAAC,AAxCD,IAwCC;AAxCY,gDAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/idw-init-account-resources",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "description": "Creation of required resources in OneReach account to enable IDW",
5
5
  "license": "UNLICENSED",
6
6
  "contributors": [
@@ -14,7 +14,7 @@
14
14
  "@or-sdk/files": "3.4.36",
15
15
  "@or-sdk/graph": "1.7.26",
16
16
  "@or-sdk/hitl": "0.34.35",
17
- "@or-sdk/idw": "7.3.3",
17
+ "@or-sdk/idw": "7.8.0",
18
18
  "@or-sdk/lookup": "1.14.5",
19
19
  "@or-sdk/pgsql": "1.1.8",
20
20
  "pg": "8.11.5",
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ import { IdwApiV2 } from '@or-sdk/idw';
4
+ import { QueryInterface, Sequelize } from 'sequelize';
5
+
6
+
7
+ /** @type {import('sequelize-cli').Migration} */
8
+ module.exports = {
9
+ async up(queryInterface: QueryInterface & { context: { sequelize: Sequelize; _orToken: string; discoveryUrl: string;}; }) {
10
+ const idwApiV2 = new IdwApiV2({
11
+ idwApiUrl: queryInterface.context.discoveryUrl.replace('discovery', 'idw'),
12
+ token: queryInterface.context._orToken,
13
+ });
14
+ await idwApiV2.syncGraph();
15
+ /**
16
+ * Add altering commands here.
17
+ *
18
+ * Example:
19
+ * await queryInterface.createTable('users', { id: Sequelize.INTEGER });
20
+ */
21
+ },
22
+
23
+ async down() {
24
+ /**
25
+ * Add reverting commands here.
26
+ *
27
+ * Example:
28
+ * await queryInterface.dropTable('users');
29
+ */
30
+ },
31
+ };
@@ -20,8 +20,8 @@ export class InitFilesResources {
20
20
 
21
21
  public async init() {
22
22
  // Add skills documentation into each account
23
- const relativePath = 'src/assets/skills/documentation';
24
- const files = fs.readdirSync(path.resolve(relativePath));
23
+ const relativePath = path.resolve(__dirname, '../assets/skills/documentation');
24
+ const files = fs.readdirSync(relativePath);
25
25
 
26
26
  const result: Record<string, string> = {};
27
27
 
@@ -35,6 +35,7 @@ export class InitFilesResources {
35
35
  fileModel: fileData,
36
36
  isPublic: true,
37
37
  prefix: 'IDW/docs/',
38
+ rewriteMode: 'rewrite',
38
39
  });
39
40
 
40
41
  result[file.replace('.pdf', '')] = url;