@vizabi/reader-ddfcsv 4.5.5 → 4.6.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/LICENSE +0 -0
- package/README.md +2 -2
- package/dist/reader-ddfcsv.js +7 -7
- package/dist/reader-ddfcsv.js.map +1 -1
- package/dist/stats.html +1 -1
- package/icon.png +0 -0
- package/lib/src/ddf-csv.d.ts +0 -0
- package/lib/src/ddf-csv.js +0 -0
- package/lib/src/ddf-csv.js.map +0 -0
- package/lib/src/ddfcsv-error.d.ts +0 -0
- package/lib/src/ddfcsv-error.js +0 -0
- package/lib/src/ddfcsv-error.js.map +0 -0
- package/lib/src/ddfcsv-reader.d.ts +0 -0
- package/lib/src/ddfcsv-reader.js +1 -1
- package/lib/src/ddfcsv-reader.js.map +0 -0
- package/lib/src/file-readers/backend-file-reader.d.ts +0 -0
- package/lib/src/file-readers/backend-file-reader.js +0 -0
- package/lib/src/file-readers/backend-file-reader.js.map +0 -0
- package/lib/src/file-readers/github-path-adapter.d.ts +0 -0
- package/lib/src/file-readers/github-path-adapter.js +12 -19
- package/lib/src/file-readers/github-path-adapter.js.map +1 -1
- package/lib/src/index.d.ts +0 -0
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +0 -0
- package/lib/src/interfaces.d.ts +0 -0
- package/lib/src/interfaces.js +0 -0
- package/lib/src/interfaces.js.map +0 -0
- package/lib/src/resource-selection-optimizer/in-clause-under-conjunction.d.ts +0 -0
- package/lib/src/resource-selection-optimizer/in-clause-under-conjunction.js +0 -0
- package/lib/src/resource-selection-optimizer/in-clause-under-conjunction.js.map +0 -0
- package/lib/src/resource-selection-optimizer/index.d.ts +0 -0
- package/lib/src/resource-selection-optimizer/index.js +0 -0
- package/lib/src/resource-selection-optimizer/index.js.map +0 -0
- package/lib-web/src/ddf-csv.d.ts +0 -0
- package/lib-web/src/ddf-csv.js +0 -0
- package/lib-web/src/ddf-csv.js.map +0 -0
- package/lib-web/src/ddfcsv-error.d.ts +0 -0
- package/lib-web/src/ddfcsv-error.js +0 -0
- package/lib-web/src/ddfcsv-error.js.map +0 -0
- package/lib-web/src/ddfcsv-reader.d.ts +0 -0
- package/lib-web/src/ddfcsv-reader.js +1 -1
- package/lib-web/src/ddfcsv-reader.js.map +0 -0
- package/lib-web/src/file-readers/frontend-file-reader.d.ts +0 -0
- package/lib-web/src/file-readers/frontend-file-reader.js +0 -0
- package/lib-web/src/file-readers/frontend-file-reader.js.map +0 -0
- package/lib-web/src/file-readers/github-path-adapter.d.ts +0 -0
- package/lib-web/src/file-readers/github-path-adapter.js +12 -19
- package/lib-web/src/file-readers/github-path-adapter.js.map +1 -1
- package/lib-web/src/index-web.d.ts +0 -0
- package/lib-web/src/index-web.js +2 -2
- package/lib-web/src/index-web.js.map +0 -0
- package/lib-web/src/interfaces.d.ts +0 -0
- package/lib-web/src/interfaces.js +0 -0
- package/lib-web/src/interfaces.js.map +0 -0
- package/lib-web/src/resource-selection-optimizer/in-clause-under-conjunction.d.ts +0 -0
- package/lib-web/src/resource-selection-optimizer/in-clause-under-conjunction.js +0 -0
- package/lib-web/src/resource-selection-optimizer/in-clause-under-conjunction.js.map +0 -0
- package/lib-web/src/resource-selection-optimizer/index.d.ts +0 -0
- package/lib-web/src/resource-selection-optimizer/index.js +0 -0
- package/lib-web/src/resource-selection-optimizer/index.js.map +0 -0
- package/package.json +10 -2
- package/rollup.config.mjs +0 -0
- package/scripts/set-own-version.js +0 -0
- package/src/ddf-csv.ts +0 -0
- package/src/ddfcsv-error.ts +0 -0
- package/src/ddfcsv-reader.ts +0 -0
- package/src/file-readers/backend-file-reader.ts +0 -0
- package/src/file-readers/frontend-file-reader.ts +0 -0
- package/src/file-readers/github-path-adapter.ts +38 -30
- package/src/index-web.ts +0 -0
- package/src/index.ts +0 -0
- package/src/interfaces.ts +0 -0
- package/src/resource-selection-optimizer/in-clause-under-conjunction.ts +0 -0
- package/src/resource-selection-optimizer/index.ts +0 -0
- package/src/test-cases/concepts.ts +0 -0
- package/src/test-cases/entities.ts +0 -0
- package/test/assets-fixtures/world-50m.json +0 -0
- package/test/assets.spec.ts +0 -0
- package/test/common.ts +0 -0
- package/test/definition/concepts-definition.spec.ts +0 -0
- package/test/definition/datapoints-definition.spec.ts +0 -0
- package/test/definition/entities-definition.spec.ts +0 -0
- package/test/definition/schema-definition.spec.ts +0 -0
- package/test/diagnostics.spec.ts +0 -0
- package/test/features-service.spec.ts +0 -0
- package/test/high-load.spec.ts +0 -0
- package/test/main.spec.ts +0 -0
- package/test/multi-instances.spec.ts +0 -0
- package/test/result-fixtures/datapoints-assets.json +0 -0
- package/test/result-fixtures/in-clause-under-conjunction-1.json +0 -0
- package/test/result-fixtures/in-clause-under-conjunction-2.json +0 -0
- package/test/result-fixtures/multi-instances/concepts-sg.json +0 -0
- package/test/result-fixtures/multi-instances/concepts-soderstornsmodellen.json +0 -0
- package/test/result-fixtures/multi-instances/datapoints-sg.json +0 -0
- package/test/result-fixtures/multi-instances/datapoints-soderstornsmodellen.json +0 -0
- package/test/result-fixtures/multi-instances/entities-sg.json +0 -0
- package/test/result-fixtures/multi-instances/entities-soderstornsmodellen.json +0 -0
- package/test/result-fixtures/multi-instances/schema-sg.json +0 -0
- package/test/result-fixtures/multi-instances/schema-soderstornsmodellen.json +0 -0
- package/test/schema.spec.ts +0 -0
- package/test/tslint.json +0 -0
- package/tsconfig-web.json +0 -0
- package/tsconfig.json +0 -0
- package/tslint.json +0 -0
- package/.nyc_output/574fe7f0-58f6-4de2-9524-16e72b784218.json +0 -1
- package/.nyc_output/9aede69f-00e6-432d-bdeb-2c9f4084a6dc.json +0 -1
- package/.nyc_output/processinfo/574fe7f0-58f6-4de2-9524-16e72b784218.json +0 -1
- package/.nyc_output/processinfo/9aede69f-00e6-432d-bdeb-2c9f4084a6dc.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -161
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -210
- package/coverage/src/ddf-csv.ts.html +0 -2866
- package/coverage/src/ddfcsv-error.ts.html +0 -148
- package/coverage/src/ddfcsv-reader.ts.html +0 -538
- package/coverage/src/file-readers/backend-file-reader.ts.html +0 -175
- package/coverage/src/file-readers/github-path-adapter.ts.html +0 -244
- package/coverage/src/file-readers/index.html +0 -131
- package/coverage/src/index.html +0 -176
- package/coverage/src/index.ts.html +0 -145
- package/coverage/src/interfaces.ts.html +0 -196
- package/coverage/src/resource-selection-optimizer/in-clause-under-conjunction.ts.html +0 -745
- package/coverage/src/resource-selection-optimizer/index.html +0 -131
- package/coverage/src/resource-selection-optimizer/index.ts.html +0 -118
- package/coverage/src/test-cases/concepts.ts.html +0 -166
- package/coverage/src/test-cases/entities.ts.html +0 -241
- package/coverage/src/test-cases/index.html +0 -131
package/icon.png
CHANGED
|
File without changes
|
package/lib/src/ddf-csv.d.ts
CHANGED
|
File without changes
|
package/lib/src/ddf-csv.js
CHANGED
|
File without changes
|
package/lib/src/ddf-csv.js.map
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/src/ddfcsv-error.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/src/ddfcsv-reader.js
CHANGED
|
@@ -8,7 +8,7 @@ const cross_project_diagnostics_1 = require("cross-project-diagnostics");
|
|
|
8
8
|
const lib_1 = require("cross-project-diagnostics/lib");
|
|
9
9
|
const github_path_adapter_1 = require("./file-readers/github-path-adapter");
|
|
10
10
|
const myName = '@vizabi/reader-ddfcsv';
|
|
11
|
-
const myVersion = '4.5.
|
|
11
|
+
const myVersion = '4.5.6';
|
|
12
12
|
function prepareDDFCsvReaderObject(defaultResourceReader) {
|
|
13
13
|
return function (externalResourceReader, logger) {
|
|
14
14
|
return {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6,36 +6,29 @@ function githubPathAdapter(path) {
|
|
|
6
6
|
const githubcom = 'https://github.com/';
|
|
7
7
|
const datapackage = '/datapackage.json';
|
|
8
8
|
const dotgit = '.git';
|
|
9
|
-
|
|
9
|
+
if (path.endsWith(datapackage)) {
|
|
10
|
+
path = path.replace(datapackage, '');
|
|
11
|
+
}
|
|
12
|
+
if (path.endsWith('/')) {
|
|
13
|
+
path = path.replace(/.$/, '');
|
|
14
|
+
}
|
|
10
15
|
if (path.startsWith(githubusercontent)) {
|
|
11
|
-
if (path.endsWith(datapackage)) {
|
|
12
|
-
path = path.replace(datapackage, '');
|
|
13
|
-
}
|
|
14
|
-
if (path.endsWith('/')) {
|
|
15
|
-
path = path.replace(/.$/, '');
|
|
16
|
-
}
|
|
17
|
-
if (howManySlashes(path) === 4) {
|
|
18
|
-
path = path + '/master';
|
|
19
|
-
}
|
|
20
16
|
return path;
|
|
21
17
|
}
|
|
22
18
|
else if (path.startsWith(githubcom)) {
|
|
23
19
|
if (path.endsWith(dotgit)) {
|
|
24
20
|
path = path.replace(dotgit, '');
|
|
25
21
|
}
|
|
26
|
-
if (path.
|
|
27
|
-
path = path
|
|
28
|
-
}
|
|
29
|
-
if (path.endsWith('/')) {
|
|
30
|
-
path = path.replace(/.$/, '');
|
|
22
|
+
if (!path.includes('/blob') && !path.includes('/tree')) {
|
|
23
|
+
path = path + '/tree/master';
|
|
31
24
|
}
|
|
32
|
-
path = path.replace(githubcom, githubusercontent);
|
|
33
25
|
if (path.includes('/blob')) {
|
|
34
|
-
path = path.replace('/blob', '');
|
|
26
|
+
path = path.replace('/blob', '/refs/heads');
|
|
35
27
|
}
|
|
36
|
-
if (
|
|
37
|
-
path = path
|
|
28
|
+
if (path.includes('/tree')) {
|
|
29
|
+
path = path.replace('/tree', '/refs/heads');
|
|
38
30
|
}
|
|
31
|
+
path = path.replace(githubcom, githubusercontent);
|
|
39
32
|
return path;
|
|
40
33
|
}
|
|
41
34
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-path-adapter.js","sourceRoot":"","sources":["../../../src/file-readers/github-path-adapter.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"github-path-adapter.js","sourceRoot":"","sources":["../../../src/file-readers/github-path-adapter.ts"],"names":[],"mappings":";;AAwBA,8CAoCC;AApCD,SAAgB,iBAAiB,CAAC,IAAY;IAE5C,MAAM,iBAAiB,GAAG,oCAAoC,CAAC;IAC/D,MAAM,SAAS,GAAG,qBAAqB,CAAC;IACxC,MAAM,WAAW,GAAG,mBAAmB,CAAC;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC;IAEtB,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACtC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAClC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACvD,IAAI,GAAG,IAAI,GAAG,cAAc,CAAC;QAC/B,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC9C,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC9C,CAAC;QACD,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAElD,OAAO,IAAI,CAAC;IAEd,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/lib/src/index.d.ts
CHANGED
|
File without changes
|
package/lib/src/index.js
CHANGED
|
@@ -10,8 +10,8 @@ const ddfcsv_reader_1 = require("./ddfcsv-reader");
|
|
|
10
10
|
var ddfcsv_reader_2 = require("./ddfcsv-reader");
|
|
11
11
|
Object.defineProperty(exports, "prepareDDFCsvReaderObject", { enumerable: true, get: function () { return ddfcsv_reader_2.prepareDDFCsvReaderObject; } });
|
|
12
12
|
exports.getDDFCsvReaderObject = (0, ddfcsv_reader_1.prepareDDFCsvReaderObject)(new backend_file_reader_1.BackendFileReader());
|
|
13
|
-
const __VERSION = '4.5.
|
|
14
|
-
const __BUILD = '
|
|
13
|
+
const __VERSION = '4.5.6';
|
|
14
|
+
const __BUILD = '1773755931243';
|
|
15
15
|
const __PACKAGE_JSON_FIELDS = {"name":"@vizabi/reader-ddfcsv","description":"Vizabi DDFcsv reader"};
|
|
16
16
|
exports.versionInfo = { version: __VERSION, build: __BUILD, package: __PACKAGE_JSON_FIELDS };
|
|
17
17
|
exports.version = __VERSION;
|
package/lib/src/index.js.map
CHANGED
|
File without changes
|
package/lib/src/interfaces.d.ts
CHANGED
|
File without changes
|
package/lib/src/interfaces.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib-web/src/ddf-csv.d.ts
CHANGED
|
File without changes
|
package/lib-web/src/ddf-csv.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,7 +5,7 @@ import { createDiagnosticManagerOn } from 'cross-project-diagnostics';
|
|
|
5
5
|
import { Level } from 'cross-project-diagnostics/lib';
|
|
6
6
|
import { githubPathAdapter } from './file-readers/github-path-adapter';
|
|
7
7
|
const myName = '@vizabi/reader-ddfcsv';
|
|
8
|
-
const myVersion = '4.5.
|
|
8
|
+
const myVersion = '4.5.6';
|
|
9
9
|
export function prepareDDFCsvReaderObject(defaultResourceReader) {
|
|
10
10
|
return function (externalResourceReader, logger) {
|
|
11
11
|
return {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,36 +3,29 @@ export function githubPathAdapter(path) {
|
|
|
3
3
|
const githubcom = 'https://github.com/';
|
|
4
4
|
const datapackage = '/datapackage.json';
|
|
5
5
|
const dotgit = '.git';
|
|
6
|
-
|
|
6
|
+
if (path.endsWith(datapackage)) {
|
|
7
|
+
path = path.replace(datapackage, '');
|
|
8
|
+
}
|
|
9
|
+
if (path.endsWith('/')) {
|
|
10
|
+
path = path.replace(/.$/, '');
|
|
11
|
+
}
|
|
7
12
|
if (path.startsWith(githubusercontent)) {
|
|
8
|
-
if (path.endsWith(datapackage)) {
|
|
9
|
-
path = path.replace(datapackage, '');
|
|
10
|
-
}
|
|
11
|
-
if (path.endsWith('/')) {
|
|
12
|
-
path = path.replace(/.$/, '');
|
|
13
|
-
}
|
|
14
|
-
if (howManySlashes(path) === 4) {
|
|
15
|
-
path = path + '/master';
|
|
16
|
-
}
|
|
17
13
|
return path;
|
|
18
14
|
}
|
|
19
15
|
else if (path.startsWith(githubcom)) {
|
|
20
16
|
if (path.endsWith(dotgit)) {
|
|
21
17
|
path = path.replace(dotgit, '');
|
|
22
18
|
}
|
|
23
|
-
if (path.
|
|
24
|
-
path = path
|
|
25
|
-
}
|
|
26
|
-
if (path.endsWith('/')) {
|
|
27
|
-
path = path.replace(/.$/, '');
|
|
19
|
+
if (!path.includes('/blob') && !path.includes('/tree')) {
|
|
20
|
+
path = path + '/tree/master';
|
|
28
21
|
}
|
|
29
|
-
path = path.replace(githubcom, githubusercontent);
|
|
30
22
|
if (path.includes('/blob')) {
|
|
31
|
-
path = path.replace('/blob', '');
|
|
23
|
+
path = path.replace('/blob', '/refs/heads');
|
|
32
24
|
}
|
|
33
|
-
if (
|
|
34
|
-
path = path
|
|
25
|
+
if (path.includes('/tree')) {
|
|
26
|
+
path = path.replace('/tree', '/refs/heads');
|
|
35
27
|
}
|
|
28
|
+
path = path.replace(githubcom, githubusercontent);
|
|
36
29
|
return path;
|
|
37
30
|
}
|
|
38
31
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-path-adapter.js","sourceRoot":"","sources":["../../../src/file-readers/github-path-adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-path-adapter.js","sourceRoot":"","sources":["../../../src/file-readers/github-path-adapter.ts"],"names":[],"mappings":"AAwBA,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAE5C,MAAM,iBAAiB,GAAG,oCAAoC,CAAC;IAC/D,MAAM,SAAS,GAAG,qBAAqB,CAAC;IACxC,MAAM,WAAW,GAAG,mBAAmB,CAAC;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC;IAEtB,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACtC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAClC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACvD,IAAI,GAAG,IAAI,GAAG,cAAc,CAAC;QAC/B,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC9C,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC9C,CAAC;QACD,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAElD,OAAO,IAAI,CAAC;IAEd,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
File without changes
|
package/lib-web/src/index-web.js
CHANGED
|
@@ -3,8 +3,8 @@ export { FrontendFileReader } from './file-readers/frontend-file-reader';
|
|
|
3
3
|
export { DdfCsvError } from './ddfcsv-error';
|
|
4
4
|
import { prepareDDFCsvReaderObject } from './ddfcsv-reader';
|
|
5
5
|
export const getDDFCsvReaderObject = prepareDDFCsvReaderObject(new FrontendFileReader());
|
|
6
|
-
const __VERSION = '4.5.
|
|
7
|
-
const __BUILD = '
|
|
6
|
+
const __VERSION = '4.5.6';
|
|
7
|
+
const __BUILD = '1773755928822';
|
|
8
8
|
const __PACKAGE_JSON_FIELDS = {"name":"@vizabi/reader-ddfcsv","description":"Vizabi DDFcsv reader"};
|
|
9
9
|
export const versionInfo = { version: __VERSION, build: __BUILD, package: __PACKAGE_JSON_FIELDS };
|
|
10
10
|
export const version = __VERSION;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizabi/reader-ddfcsv",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Vizabi DDFcsv reader",
|
|
5
5
|
"author": "Vyacheslav Chub<vyacheslav.chub@valor-software.com>",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
+
"exports": {
|
|
13
|
+
"node": "./lib/src/index.js",
|
|
14
|
+
"browser": "./dist/reader-ddfcsv.js",
|
|
15
|
+
"types": "./lib/src/index.d.ts",
|
|
16
|
+
"default": "./dist/reader-ddfcsv.js"
|
|
17
|
+
},
|
|
12
18
|
"scripts": {
|
|
13
19
|
"rollup": "rollup -c",
|
|
14
20
|
"tslint:src": "./node_modules/.bin/tslint -c ./tslint.json 'src/**/*.ts'",
|
|
@@ -47,7 +53,9 @@
|
|
|
47
53
|
"instrument": true
|
|
48
54
|
},
|
|
49
55
|
"mocha": {
|
|
50
|
-
"node-option": [
|
|
56
|
+
"node-option": [
|
|
57
|
+
"import=tsx"
|
|
58
|
+
],
|
|
51
59
|
"require": [
|
|
52
60
|
"source-map-support/register"
|
|
53
61
|
],
|
package/rollup.config.mjs
CHANGED
|
File without changes
|
|
File without changes
|
package/src/ddf-csv.ts
CHANGED
|
File without changes
|
package/src/ddfcsv-error.ts
CHANGED
|
File without changes
|
package/src/ddfcsv-reader.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,50 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
normalised paths should look like this:
|
|
3
|
+
https://raw.githubusercontent.com/open-numbers/repository/refs/heads/branch - for github only, no trailing slahs, no filename in the end
|
|
4
|
+
https://domain.com/path/ddf--gapminder--systema_globalis - for any other host
|
|
5
|
+
|
|
6
|
+
examples of supported cases
|
|
7
|
+
custom hosting
|
|
8
|
+
https://domain.com/path/ddf--gapminder--systema_globalis - not github and not at githubusercontent, left as is
|
|
9
|
+
https://domain.com/path/ddf--gapminder--systema_globalis/ - trailing slash removed
|
|
10
|
+
https://domain.com/path/ddf--gapminder--systema_globalis/datapackage.json - datapackage file in the end removed
|
|
11
|
+
|
|
12
|
+
githubusercontent prefix
|
|
13
|
+
https://raw.githubusercontent.com/open-numbers/ddf--gapminder--systema_globalis/refs/heads/develop - already good
|
|
14
|
+
https://raw.githubusercontent.com/open-numbers/ddf--gapminder--systema_globalis/refs/heads/develop/datapackage.json - datapackage file in the end
|
|
15
|
+
https://raw.githubusercontent.com/open-numbers/ddf--gapminder--systema_globalis/refs/heads/develop/ - trailing slash
|
|
16
|
+
|
|
17
|
+
github prefix
|
|
18
|
+
https://github.com/open-numbers/ddf--gapminder--systema_globalis - plain, possible trailing slash, assumes master branch
|
|
19
|
+
https://github.com/open-numbers/ddf--gapminder--systema_globalis.git - with .git, assumes master branch
|
|
20
|
+
https://github.com/open-numbers/ddf--gapminder--systema_globalis/tree/develop - with branch, possible trailing slash
|
|
21
|
+
https://github.com/open-numbers/ddf--gapminder--systema_globalis/blob/develop/datapackage.json - blob and specific file
|
|
22
|
+
|
|
23
|
+
*/
|
|
24
|
+
|
|
1
25
|
export function githubPathAdapter(path: string) {
|
|
2
|
-
// examples of supported cases
|
|
3
|
-
// https://raw.githubusercontent.com/open-numbers/ddf--open_numbers--world_development_indicators/master
|
|
4
|
-
// https://raw.githubusercontent.com/open-numbers/ddf--open_numbers--world_development_indicators/master/
|
|
5
|
-
// https://raw.githubusercontent.com/open-numbers/ddf--open_numbers--world_development_indicators/master/datapackage.json
|
|
6
26
|
|
|
7
|
-
// assumes master branch
|
|
8
|
-
// https://github.com/open-numbers/ddf--open_numbers--world_development_indicators
|
|
9
|
-
// https://github.com/open-numbers/ddf--open_numbers--world_development_indicators.git
|
|
10
|
-
// https://github.com/open-numbers/ddf--open_numbers--world_development_indicators/blob/master/datapackage.json
|
|
11
27
|
const githubusercontent = 'https://raw.githubusercontent.com/';
|
|
12
28
|
const githubcom = 'https://github.com/';
|
|
13
29
|
const datapackage = '/datapackage.json';
|
|
14
30
|
const dotgit = '.git';
|
|
15
|
-
|
|
31
|
+
|
|
32
|
+
if (path.endsWith(datapackage)) {
|
|
33
|
+
path = path.replace(datapackage, '');
|
|
34
|
+
}
|
|
35
|
+
if (path.endsWith('/')) {
|
|
36
|
+
path = path.replace(/.$/, ''); // remove trailing slash
|
|
37
|
+
}
|
|
16
38
|
|
|
17
39
|
if (path.startsWith(githubusercontent)) {
|
|
18
|
-
if (path.endsWith(datapackage)) {
|
|
19
|
-
path = path.replace(datapackage, '');
|
|
20
|
-
}
|
|
21
|
-
if (path.endsWith('/')) {
|
|
22
|
-
path = path.replace(/.$/, ''); // remove trailing slash
|
|
23
|
-
}
|
|
24
|
-
if (howManySlashes(path) === 4) {
|
|
25
|
-
path = path + '/master';
|
|
26
|
-
}
|
|
27
40
|
return path;
|
|
28
|
-
|
|
29
41
|
} else if (path.startsWith(githubcom)) {
|
|
30
42
|
if (path.endsWith(dotgit)) {
|
|
31
43
|
path = path.replace(dotgit, '');
|
|
32
44
|
}
|
|
33
|
-
if (path.
|
|
34
|
-
path = path
|
|
35
|
-
}
|
|
36
|
-
if (path.endsWith('/')) {
|
|
37
|
-
path = path.replace(/.$/, ''); // remove trailing slash
|
|
45
|
+
if (!path.includes('/blob') && !path.includes('/tree')) {
|
|
46
|
+
path = path + '/tree/master'; // assume master branch if none specified
|
|
38
47
|
}
|
|
39
|
-
|
|
40
|
-
path = path.replace(githubcom, githubusercontent);
|
|
41
|
-
|
|
42
48
|
if (path.includes('/blob')) {
|
|
43
|
-
path = path.replace('/blob', '');
|
|
49
|
+
path = path.replace('/blob', '/refs/heads'); // replace blob with refs/heads
|
|
44
50
|
}
|
|
45
|
-
if (
|
|
46
|
-
path = path
|
|
51
|
+
if (path.includes('/tree')) {
|
|
52
|
+
path = path.replace('/tree', '/refs/heads'); // replace tree with refs/heads
|
|
47
53
|
}
|
|
54
|
+
path = path.replace(githubcom, githubusercontent);
|
|
55
|
+
|
|
48
56
|
return path;
|
|
49
57
|
|
|
50
58
|
} else {
|
package/src/index-web.ts
CHANGED
|
File without changes
|
package/src/index.ts
CHANGED
|
File without changes
|
package/src/interfaces.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/assets.spec.ts
CHANGED
|
File without changes
|
package/test/common.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/diagnostics.spec.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/test/high-load.spec.ts
CHANGED
|
File without changes
|
package/test/main.spec.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/schema.spec.ts
CHANGED
|
File without changes
|
package/test/tslint.json
CHANGED
|
File without changes
|
package/tsconfig-web.json
CHANGED
|
File without changes
|
package/tsconfig.json
CHANGED
|
File without changes
|
package/tslint.json
CHANGED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|