@dataverse-to-code/test 1.5.0 → 1.51.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/dist/.built CHANGED
@@ -1 +1 @@
1
- 2026-12-01T06:45:18.556Z
1
+ 2026-12-06T19:02:47.038Z
package/dist/cli.js CHANGED
@@ -11837,6 +11837,8 @@ var SUFFIXES = [
11837
11837
  [".seed.yaml", "Seed"],
11838
11838
  [".rule.yaml", "BusinessRule"],
11839
11839
  [".form.yaml", "Form"],
11840
+ [".view.yaml", "View"],
11841
+ [".chart.yaml", "Chart"],
11840
11842
  [".design.yaml", "Design"],
11841
11843
  [".datasource.yaml", "DataSource"],
11842
11844
  [".connref.yaml", "ConnectionReference"],
@@ -12069,6 +12071,51 @@ function toForm(f) {
12069
12071
  if (!d || !name2) return void 0;
12070
12072
  return { uri: f.uri, name: name2, table: str(d.table), type: str(d.type), id: str(d.id), state: str(d.state), definition: str(d.definition), hasLayout: d.layout !== void 0 };
12071
12073
  }
12074
+ function toView(f) {
12075
+ const d = f.data;
12076
+ const name2 = str(d?.name);
12077
+ if (!d || !name2) return void 0;
12078
+ const given = (key3) => (str(d[key3]) ?? "").trim() !== "";
12079
+ const lines = {};
12080
+ for (const key3 of Object.keys(d)) lines[key3] = f.rangeAt([key3], "key").start.line;
12081
+ return {
12082
+ file: f.uri,
12083
+ table: str(d.table),
12084
+ name: name2,
12085
+ id: str(d.id),
12086
+ type: str(d.type) ?? "public",
12087
+ isDefault: d.default === true,
12088
+ columns: list(d.columns).flatMap((c) => {
12089
+ const column = str(obj(c).column);
12090
+ return column ? [column] : [];
12091
+ }),
12092
+ findColumns: list(d.findColumns).filter((x3) => typeof x3 === "string" && x3 !== ""),
12093
+ hasWhere: given("where"),
12094
+ hasOrderBy: given("orderBy"),
12095
+ hasFetchXml: given("fetchXml"),
12096
+ hasLayoutXml: typeof d.layoutXml === "string",
12097
+ lines
12098
+ };
12099
+ }
12100
+ function toChart(f) {
12101
+ const d = f.data;
12102
+ const name2 = str(d?.name);
12103
+ if (!d || !name2) return void 0;
12104
+ const given = (key3) => (str(d[key3]) ?? "").trim() !== "";
12105
+ const lines = {};
12106
+ for (const key3 of Object.keys(d)) lines[key3] = f.rangeAt([key3], "key").start.line;
12107
+ return {
12108
+ file: f.uri,
12109
+ table: str(d.table),
12110
+ name: name2,
12111
+ id: str(d.id),
12112
+ isDefault: d.default === true,
12113
+ ...given("chart") ? { chart: str(d.chart) } : {},
12114
+ hasData: given("data"),
12115
+ hasPresentation: given("presentation"),
12116
+ lines
12117
+ };
12118
+ }
12072
12119
  var APP_PAGE_KEYS = ["table", "dashboard", "customPage", "webResource", "url"];
12073
12120
  function toApp(f) {
12074
12121
  const d = f.data;
@@ -12091,7 +12138,19 @@ function toApp(f) {
12091
12138
  if (typeof n === "string") forms2.push({ name: n, path: ["parts", table, "forms", i] });
12092
12139
  });
12093
12140
  else if (typeof v === "string" && v.toLowerCase() !== "all") forms2.push({ name: v, path: ["parts", table, "forms"] });
12094
- return { table, forms: forms2 };
12141
+ const views = [];
12142
+ const listed = obj(value2).views;
12143
+ if (Array.isArray(listed)) listed.forEach((n, i) => {
12144
+ if (typeof n === "string") views.push({ name: n, path: ["parts", table, "views", i] });
12145
+ });
12146
+ else if (typeof listed === "string" && listed.toLowerCase() !== "all") views.push({ name: listed, path: ["parts", table, "views"] });
12147
+ const charts = [];
12148
+ const chartList = obj(value2).charts;
12149
+ if (Array.isArray(chartList)) chartList.forEach((n, i) => {
12150
+ if (typeof n === "string") charts.push({ name: n, path: ["parts", table, "charts", i] });
12151
+ });
12152
+ else if (typeof chartList === "string" && chartList.toLowerCase() !== "all") charts.push({ name: chartList, path: ["parts", table, "charts"] });
12153
+ return { table, forms: forms2, views, charts };
12095
12154
  });
12096
12155
  return { uri: f.uri, uniqueName: str(d.uniqueName), pages, parts: parts2 };
12097
12156
  }
@@ -12189,6 +12248,73 @@ var JSON_FUNCTIONS = [
12189
12248
  fn("JSON_ARRAY", "JSON_ARRAY(value, \u2026)", "JSON_ARRAY(${1:value})")
12190
12249
  ];
12191
12250
  var OPENJSON = fn("OPENJSON", "OPENJSON(json[, path]) WITH (column type 'path', \u2026)", "OPENJSON(${1:json}) WITH (${2:column} ${3:nvarchar(100)} '${4:\\$.path}')");
12251
+ var DQL_VIEW_SAMPLES = [
12252
+ "yesterday()",
12253
+ "today()",
12254
+ "tomorrow()",
12255
+ "lastsevendays()",
12256
+ "nextsevendays()",
12257
+ "lastweek()",
12258
+ "thisweek()",
12259
+ "nextweek()",
12260
+ "lastmonth()",
12261
+ "thismonth()",
12262
+ "nextmonth()",
12263
+ "[on]('2026-01-01')",
12264
+ "onorbefore('2026-01-01')",
12265
+ "onorafter('2026-01-01')",
12266
+ "lastyear()",
12267
+ "thisyear()",
12268
+ "nextyear()",
12269
+ "lastxhours(7)",
12270
+ "nextxhours(7)",
12271
+ "lastxdays(7)",
12272
+ "nextxdays(7)",
12273
+ "lastxweeks(7)",
12274
+ "nextxweeks(7)",
12275
+ "lastxmonths(7)",
12276
+ "nextxmonths(7)",
12277
+ "olderthanxmonths(7)",
12278
+ "olderthanxyears(7)",
12279
+ "olderthanxweeks(7)",
12280
+ "olderthanxdays(7)",
12281
+ "olderthanxhours(7)",
12282
+ "olderthanxminutes(7)",
12283
+ "lastxyears(7)",
12284
+ "nextxyears(7)",
12285
+ "equserid()",
12286
+ "neuserid()",
12287
+ "equserteams()",
12288
+ "equseroruserteams()",
12289
+ "equseroruserhierarchy()",
12290
+ "equseroruserhierarchyandteams()",
12291
+ "eqbusinessid()",
12292
+ "nebusinessid()",
12293
+ "equserlanguage()",
12294
+ "thisfiscalyear()",
12295
+ "thisfiscalperiod()",
12296
+ "nextfiscalyear()",
12297
+ "nextfiscalperiod()",
12298
+ "lastfiscalyear()",
12299
+ "lastfiscalperiod()",
12300
+ "lastxfiscalyears(7)",
12301
+ "lastxfiscalperiods(7)",
12302
+ "nextxfiscalyears(7)",
12303
+ "nextxfiscalperiods(7)",
12304
+ "infiscalyear(2026)",
12305
+ "infiscalperiod(3)",
12306
+ "infiscalperiodandyear(3, 2026)",
12307
+ "inorbeforefiscalperiodandyear(3, 2026)",
12308
+ "inorafterfiscalperiodandyear(3, 2026)",
12309
+ "under('00000000-0000-0000-0000-000000000001')",
12310
+ "eqorunder('00000000-0000-0000-0000-000000000001')",
12311
+ "notunder('00000000-0000-0000-0000-000000000001')",
12312
+ "above('00000000-0000-0000-0000-000000000001')",
12313
+ "eqorabove('00000000-0000-0000-0000-000000000001')",
12314
+ "containvalues(1, 2)",
12315
+ "notcontainvalues(1, 2)"
12316
+ ];
12317
+ var DQL_VIEW_FUNCTIONS = DQL_VIEW_SAMPLES.map((s) => s.slice(0, s.indexOf("(")));
12192
12318
 
12193
12319
  // ../../extension/src/core/workspace.ts
12194
12320
  var byUri = (a, b) => a.uri < b.uri ? -1 : a.uri > b.uri ? 1 : 0;
@@ -12277,6 +12403,8 @@ function buildIndex(rootDir, files2, snapshot, snapshotColumns, extras, views, s
12277
12403
  seeds: pick("Seed", toSeed),
12278
12404
  rules: pick("BusinessRule", toRule),
12279
12405
  forms: pick("Form", toForm),
12406
+ systemViews: pick("View", toView),
12407
+ systemCharts: pick("Chart", toChart),
12280
12408
  apps: pick("App", toApp),
12281
12409
  flows: pick("CloudFlow", toFlow),
12282
12410
  dataSources: pick("DataSource", toDataSource),
package/dist/index.js CHANGED
@@ -7669,6 +7669,8 @@ var SUFFIXES = [
7669
7669
  [".seed.yaml", "Seed"],
7670
7670
  [".rule.yaml", "BusinessRule"],
7671
7671
  [".form.yaml", "Form"],
7672
+ [".view.yaml", "View"],
7673
+ [".chart.yaml", "Chart"],
7672
7674
  [".design.yaml", "Design"],
7673
7675
  [".datasource.yaml", "DataSource"],
7674
7676
  [".connref.yaml", "ConnectionReference"],
@@ -7901,6 +7903,51 @@ function toForm(f) {
7901
7903
  if (!d || !name) return void 0;
7902
7904
  return { uri: f.uri, name, table: str(d.table), type: str(d.type), id: str(d.id), state: str(d.state), definition: str(d.definition), hasLayout: d.layout !== void 0 };
7903
7905
  }
7906
+ function toView(f) {
7907
+ const d = f.data;
7908
+ const name = str(d?.name);
7909
+ if (!d || !name) return void 0;
7910
+ const given = (key3) => (str(d[key3]) ?? "").trim() !== "";
7911
+ const lines = {};
7912
+ for (const key3 of Object.keys(d)) lines[key3] = f.rangeAt([key3], "key").start.line;
7913
+ return {
7914
+ file: f.uri,
7915
+ table: str(d.table),
7916
+ name,
7917
+ id: str(d.id),
7918
+ type: str(d.type) ?? "public",
7919
+ isDefault: d.default === true,
7920
+ columns: list(d.columns).flatMap((c) => {
7921
+ const column = str(obj(c).column);
7922
+ return column ? [column] : [];
7923
+ }),
7924
+ findColumns: list(d.findColumns).filter((x) => typeof x === "string" && x !== ""),
7925
+ hasWhere: given("where"),
7926
+ hasOrderBy: given("orderBy"),
7927
+ hasFetchXml: given("fetchXml"),
7928
+ hasLayoutXml: typeof d.layoutXml === "string",
7929
+ lines
7930
+ };
7931
+ }
7932
+ function toChart(f) {
7933
+ const d = f.data;
7934
+ const name = str(d?.name);
7935
+ if (!d || !name) return void 0;
7936
+ const given = (key3) => (str(d[key3]) ?? "").trim() !== "";
7937
+ const lines = {};
7938
+ for (const key3 of Object.keys(d)) lines[key3] = f.rangeAt([key3], "key").start.line;
7939
+ return {
7940
+ file: f.uri,
7941
+ table: str(d.table),
7942
+ name,
7943
+ id: str(d.id),
7944
+ isDefault: d.default === true,
7945
+ ...given("chart") ? { chart: str(d.chart) } : {},
7946
+ hasData: given("data"),
7947
+ hasPresentation: given("presentation"),
7948
+ lines
7949
+ };
7950
+ }
7904
7951
  var APP_PAGE_KEYS = ["table", "dashboard", "customPage", "webResource", "url"];
7905
7952
  function toApp(f) {
7906
7953
  const d = f.data;
@@ -7923,7 +7970,19 @@ function toApp(f) {
7923
7970
  if (typeof n === "string") forms.push({ name: n, path: ["parts", table, "forms", i] });
7924
7971
  });
7925
7972
  else if (typeof v === "string" && v.toLowerCase() !== "all") forms.push({ name: v, path: ["parts", table, "forms"] });
7926
- return { table, forms };
7973
+ const views = [];
7974
+ const listed = obj(value).views;
7975
+ if (Array.isArray(listed)) listed.forEach((n, i) => {
7976
+ if (typeof n === "string") views.push({ name: n, path: ["parts", table, "views", i] });
7977
+ });
7978
+ else if (typeof listed === "string" && listed.toLowerCase() !== "all") views.push({ name: listed, path: ["parts", table, "views"] });
7979
+ const charts = [];
7980
+ const chartList = obj(value).charts;
7981
+ if (Array.isArray(chartList)) chartList.forEach((n, i) => {
7982
+ if (typeof n === "string") charts.push({ name: n, path: ["parts", table, "charts", i] });
7983
+ });
7984
+ else if (typeof chartList === "string" && chartList.toLowerCase() !== "all") charts.push({ name: chartList, path: ["parts", table, "charts"] });
7985
+ return { table, forms, views, charts };
7927
7986
  });
7928
7987
  return { uri: f.uri, uniqueName: str(d.uniqueName), pages, parts: parts2 };
7929
7988
  }
@@ -7997,6 +8056,73 @@ var JSON_FUNCTIONS = [
7997
8056
  fn("JSON_ARRAY", "JSON_ARRAY(value, \u2026)", "JSON_ARRAY(${1:value})")
7998
8057
  ];
7999
8058
  var OPENJSON = fn("OPENJSON", "OPENJSON(json[, path]) WITH (column type 'path', \u2026)", "OPENJSON(${1:json}) WITH (${2:column} ${3:nvarchar(100)} '${4:\\$.path}')");
8059
+ var DQL_VIEW_SAMPLES = [
8060
+ "yesterday()",
8061
+ "today()",
8062
+ "tomorrow()",
8063
+ "lastsevendays()",
8064
+ "nextsevendays()",
8065
+ "lastweek()",
8066
+ "thisweek()",
8067
+ "nextweek()",
8068
+ "lastmonth()",
8069
+ "thismonth()",
8070
+ "nextmonth()",
8071
+ "[on]('2026-01-01')",
8072
+ "onorbefore('2026-01-01')",
8073
+ "onorafter('2026-01-01')",
8074
+ "lastyear()",
8075
+ "thisyear()",
8076
+ "nextyear()",
8077
+ "lastxhours(7)",
8078
+ "nextxhours(7)",
8079
+ "lastxdays(7)",
8080
+ "nextxdays(7)",
8081
+ "lastxweeks(7)",
8082
+ "nextxweeks(7)",
8083
+ "lastxmonths(7)",
8084
+ "nextxmonths(7)",
8085
+ "olderthanxmonths(7)",
8086
+ "olderthanxyears(7)",
8087
+ "olderthanxweeks(7)",
8088
+ "olderthanxdays(7)",
8089
+ "olderthanxhours(7)",
8090
+ "olderthanxminutes(7)",
8091
+ "lastxyears(7)",
8092
+ "nextxyears(7)",
8093
+ "equserid()",
8094
+ "neuserid()",
8095
+ "equserteams()",
8096
+ "equseroruserteams()",
8097
+ "equseroruserhierarchy()",
8098
+ "equseroruserhierarchyandteams()",
8099
+ "eqbusinessid()",
8100
+ "nebusinessid()",
8101
+ "equserlanguage()",
8102
+ "thisfiscalyear()",
8103
+ "thisfiscalperiod()",
8104
+ "nextfiscalyear()",
8105
+ "nextfiscalperiod()",
8106
+ "lastfiscalyear()",
8107
+ "lastfiscalperiod()",
8108
+ "lastxfiscalyears(7)",
8109
+ "lastxfiscalperiods(7)",
8110
+ "nextxfiscalyears(7)",
8111
+ "nextxfiscalperiods(7)",
8112
+ "infiscalyear(2026)",
8113
+ "infiscalperiod(3)",
8114
+ "infiscalperiodandyear(3, 2026)",
8115
+ "inorbeforefiscalperiodandyear(3, 2026)",
8116
+ "inorafterfiscalperiodandyear(3, 2026)",
8117
+ "under('00000000-0000-0000-0000-000000000001')",
8118
+ "eqorunder('00000000-0000-0000-0000-000000000001')",
8119
+ "notunder('00000000-0000-0000-0000-000000000001')",
8120
+ "above('00000000-0000-0000-0000-000000000001')",
8121
+ "eqorabove('00000000-0000-0000-0000-000000000001')",
8122
+ "containvalues(1, 2)",
8123
+ "notcontainvalues(1, 2)"
8124
+ ];
8125
+ var DQL_VIEW_FUNCTIONS = DQL_VIEW_SAMPLES.map((s) => s.slice(0, s.indexOf("(")));
8000
8126
 
8001
8127
  // ../../extension/src/core/workspace.ts
8002
8128
  var byUri = (a, b) => a.uri < b.uri ? -1 : a.uri > b.uri ? 1 : 0;
@@ -8085,6 +8211,8 @@ function buildIndex(rootDir, files, snapshot, snapshotColumns, extras, views, sc
8085
8211
  seeds: pick("Seed", toSeed),
8086
8212
  rules: pick("BusinessRule", toRule),
8087
8213
  forms: pick("Form", toForm),
8214
+ systemViews: pick("View", toView),
8215
+ systemCharts: pick("Chart", toChart),
8088
8216
  apps: pick("App", toApp),
8089
8217
  flows: pick("CloudFlow", toFlow),
8090
8218
  dataSources: pick("DataSource", toDataSource),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataverse-to-code/test",
3
- "version": "1.5.0",
3
+ "version": "1.51.0",
4
4
  "description": "Run DataverseToCode project tests (.test.yaml) with Playwright: the offline form simulator in Chromium, a form fixture, and yamlTests(). Works with Microsoft Dataverse; not a Microsoft product.",
5
5
  "license": "MIT",
6
6
  "author": "Simon Allport",