@vizabi/reader-ddfcsv 4.3.11 → 4.5.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.
Files changed (131) hide show
  1. package/.travis.yml +0 -0
  2. package/LICENSE +0 -0
  3. package/README.md +0 -0
  4. package/deploy.js +0 -0
  5. package/dist/reader-ddfcsv-polyfill.js +1 -1
  6. package/dist/reader-ddfcsv-polyfill.js.map +1 -1
  7. package/dist/reader-ddfcsv.js +2 -2
  8. package/dist/reader-ddfcsv.js.map +1 -1
  9. package/icon.png +0 -0
  10. package/lib/src/ddf-csv.d.ts +1 -0
  11. package/lib/src/ddf-csv.js +6 -2
  12. package/lib/src/ddf-csv.js.map +1 -1
  13. package/lib/src/ddfcsv-error.d.ts +0 -0
  14. package/lib/src/ddfcsv-error.js +0 -0
  15. package/lib/src/ddfcsv-error.js.map +0 -0
  16. package/lib/src/ddfcsv-reader.d.ts +1 -1
  17. package/lib/src/ddfcsv-reader.js +10 -3
  18. package/lib/src/ddfcsv-reader.js.map +1 -1
  19. package/lib/src/file-readers/backend-file-reader.d.ts +0 -0
  20. package/lib/src/file-readers/backend-file-reader.js +0 -0
  21. package/lib/src/file-readers/backend-file-reader.js.map +0 -0
  22. package/lib/src/file-readers/github-path-adapter.d.ts +0 -0
  23. package/lib/src/file-readers/github-path-adapter.js +0 -0
  24. package/lib/src/file-readers/github-path-adapter.js.map +0 -0
  25. package/lib/src/index.d.ts +0 -0
  26. package/lib/src/index.js +2 -2
  27. package/lib/src/index.js.map +0 -0
  28. package/lib/src/interfaces.d.ts +0 -0
  29. package/lib/src/interfaces.js +0 -0
  30. package/lib/src/interfaces.js.map +0 -0
  31. package/lib/src/resource-selection-optimizer/in-clause-under-conjunction.d.ts +0 -0
  32. package/lib/src/resource-selection-optimizer/in-clause-under-conjunction.js +0 -0
  33. package/lib/src/resource-selection-optimizer/in-clause-under-conjunction.js.map +0 -0
  34. package/lib/src/resource-selection-optimizer/index.d.ts +0 -0
  35. package/lib/src/resource-selection-optimizer/index.js +0 -0
  36. package/lib/src/resource-selection-optimizer/index.js.map +0 -0
  37. package/lib-web/src/ddf-csv.d.ts +1 -0
  38. package/lib-web/src/ddf-csv.js +6 -2
  39. package/lib-web/src/ddf-csv.js.map +1 -1
  40. package/lib-web/src/ddfcsv-error.d.ts +0 -0
  41. package/lib-web/src/ddfcsv-error.js +0 -0
  42. package/lib-web/src/ddfcsv-error.js.map +0 -0
  43. package/lib-web/src/ddfcsv-reader.d.ts +1 -1
  44. package/lib-web/src/ddfcsv-reader.js +10 -3
  45. package/lib-web/src/ddfcsv-reader.js.map +1 -1
  46. package/lib-web/src/file-readers/frontend-file-reader.d.ts +0 -0
  47. package/lib-web/src/file-readers/frontend-file-reader.js +0 -0
  48. package/lib-web/src/file-readers/frontend-file-reader.js.map +0 -0
  49. package/lib-web/src/file-readers/github-path-adapter.d.ts +0 -0
  50. package/lib-web/src/file-readers/github-path-adapter.js +0 -0
  51. package/lib-web/src/file-readers/github-path-adapter.js.map +0 -0
  52. package/lib-web/src/index-web.d.ts +0 -0
  53. package/lib-web/src/index-web.js +2 -2
  54. package/lib-web/src/index-web.js.map +0 -0
  55. package/lib-web/src/interfaces.d.ts +0 -0
  56. package/lib-web/src/interfaces.js +0 -0
  57. package/lib-web/src/interfaces.js.map +0 -0
  58. package/lib-web/src/resource-selection-optimizer/in-clause-under-conjunction.d.ts +0 -0
  59. package/lib-web/src/resource-selection-optimizer/in-clause-under-conjunction.js +0 -0
  60. package/lib-web/src/resource-selection-optimizer/in-clause-under-conjunction.js.map +0 -0
  61. package/lib-web/src/resource-selection-optimizer/index.d.ts +0 -0
  62. package/lib-web/src/resource-selection-optimizer/index.js +0 -0
  63. package/lib-web/src/resource-selection-optimizer/index.js.map +0 -0
  64. package/package.json +1 -9
  65. package/scripts/set-own-version.js +0 -0
  66. package/src/ddf-csv.ts +7 -2
  67. package/src/ddfcsv-error.ts +0 -0
  68. package/src/ddfcsv-reader.ts +9 -2
  69. package/src/file-readers/backend-file-reader.ts +0 -0
  70. package/src/file-readers/frontend-file-reader.ts +0 -0
  71. package/src/file-readers/github-path-adapter.ts +0 -0
  72. package/src/index-web.ts +0 -0
  73. package/src/index.ts +0 -0
  74. package/src/interfaces.ts +0 -0
  75. package/src/resource-selection-optimizer/in-clause-under-conjunction.ts +0 -0
  76. package/src/resource-selection-optimizer/index.ts +0 -0
  77. package/src/test-cases/concepts.ts +0 -0
  78. package/src/test-cases/entities.ts +0 -0
  79. package/test/assets-fixtures/world-50m.json +0 -0
  80. package/test/assets.spec.ts +0 -0
  81. package/test/common.ts +0 -0
  82. package/test/definition/concepts-definition.spec.ts +0 -0
  83. package/test/definition/datapoints-definition.spec.ts +0 -0
  84. package/test/definition/entities-definition.spec.ts +0 -0
  85. package/test/definition/schema-definition.spec.ts +0 -0
  86. package/test/diagnostics.spec.ts +0 -0
  87. package/test/features-service.spec.ts +0 -0
  88. package/test/high-load.spec.ts +0 -0
  89. package/test/main.spec.ts +0 -0
  90. package/test/mocha.opts +0 -0
  91. package/test/multi-instances.spec.ts +0 -0
  92. package/test/result-fixtures/datapoints-assets.json +0 -0
  93. package/test/result-fixtures/in-clause-under-conjunction-1.json +0 -0
  94. package/test/result-fixtures/in-clause-under-conjunction-2.json +0 -0
  95. package/test/result-fixtures/multi-instances/concepts-sg.json +0 -0
  96. package/test/result-fixtures/multi-instances/concepts-soderstornsmodellen.json +0 -0
  97. package/test/result-fixtures/multi-instances/datapoints-sg.json +0 -0
  98. package/test/result-fixtures/multi-instances/datapoints-soderstornsmodellen.json +0 -0
  99. package/test/result-fixtures/multi-instances/entities-sg.json +0 -0
  100. package/test/result-fixtures/multi-instances/entities-soderstornsmodellen.json +0 -0
  101. package/test/result-fixtures/multi-instances/schema-sg.json +0 -0
  102. package/test/result-fixtures/multi-instances/schema-soderstornsmodellen.json +0 -0
  103. package/test/schema.spec.ts +0 -0
  104. package/test/tslint.json +0 -0
  105. package/tsconfig-web.json +0 -0
  106. package/tsconfig.json +0 -0
  107. package/tslint.json +0 -0
  108. package/.nyc_output/6feafbf28840d8453a35f3938d258f72.json +0 -1
  109. package/.nyc_output/d4b22a0dc4a37c160be23c49fdbe4298.json +0 -1
  110. package/CHANGELOG.md +0 -356
  111. package/coverage/base.css +0 -223
  112. package/coverage/block-navigation.js +0 -63
  113. package/coverage/index.html +0 -136
  114. package/coverage/prettify.css +0 -1
  115. package/coverage/prettify.js +0 -1
  116. package/coverage/sort-arrow-sprite.png +0 -0
  117. package/coverage/sorter.js +0 -158
  118. package/coverage/src/ddf-csv.ts.html +0 -2826
  119. package/coverage/src/ddfcsv-error.ts.html +0 -132
  120. package/coverage/src/ddfcsv-reader.ts.html +0 -501
  121. package/coverage/src/file-readers/backend-file-reader.ts.html +0 -159
  122. package/coverage/src/file-readers/github-path-adapter.ts.html +0 -228
  123. package/coverage/src/file-readers/index.html +0 -110
  124. package/coverage/src/index.html +0 -136
  125. package/coverage/src/index.ts.html +0 -129
  126. package/coverage/src/resource-selection-optimizer/in-clause-under-conjunction.ts.html +0 -729
  127. package/coverage/src/resource-selection-optimizer/index.html +0 -110
  128. package/coverage/src/resource-selection-optimizer/index.ts.html +0 -102
  129. package/coverage/src/test-cases/concepts.ts.html +0 -150
  130. package/coverage/src/test-cases/entities.ts.html +0 -225
  131. package/coverage/src/test-cases/index.html +0 -110
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizabi/reader-ddfcsv",
3
- "version": "4.3.11",
3
+ "version": "4.5.0",
4
4
  "description": "Vizabi DDFcsv reader",
5
5
  "author": "Vyacheslav Chub<vyacheslav.chub@valor-software.com>",
6
6
  "license": "GPL-3.0",
@@ -28,14 +28,9 @@
28
28
  "test-travis": "npm run e2e && nyc report --reporter=text-lcov > coverage.lcov && codecov",
29
29
  "test-schema": "mocha --require ts-node/register --recursive test/schema.spec.ts",
30
30
  "set-own-version": "cd scripts && node ./set-own-version.js",
31
- "changelog": "conventional-changelog -i CHANGELOG.md -s -p angular",
32
- "github-release": "conventional-github-releaser -p angular",
33
31
  "build": "npm run build:web && rimraf lib && npm run build:node",
34
32
  "build:node": "npm run tsc-node",
35
33
  "build:web": "npm run tsc-web && npm run webpack",
36
- "preversion": "npm run build",
37
- "version": "npm run changelog && git add CHANGELOG.md",
38
- "postversion": "git push origin master && git push --tags && npm run github-release",
39
34
  "prepublish": "npm run build",
40
35
  "deploy": "node deploy.js"
41
36
  },
@@ -110,9 +105,6 @@
110
105
  "codecov": "3.0.4",
111
106
  "compare-version": "0.1.2",
112
107
  "compression-webpack-plugin": "1.1.11",
113
- "conventional-changelog": "1.1.3",
114
- "conventional-changelog-cli": "1.3.1",
115
- "conventional-github-releaser": "1.1.9",
116
108
  "copy-webpack-plugin": "4.5.2",
117
109
  "html-webpack-plugin": "3.2.0",
118
110
  "mocha": "5.2.0",
File without changes
package/src/ddf-csv.ts CHANGED
@@ -43,6 +43,10 @@ export function ddfCsvReader (logger?: any) {
43
43
  let datapackagePromise;
44
44
  let datasetWithConstraints = false;
45
45
 
46
+ function getDatasetInfo(baseOptions: IBaseReaderOptions) : Promise<Object> {
47
+ return (datapackagePromise || loadDataPackage(baseOptions));
48
+ }
49
+
46
50
  function loadDataPackage (baseOptions: IBaseReaderOptions): Promise<IDatapackage> {
47
51
  const datapackagePath = getFilePath(baseOptions.basePath);
48
52
  const { debug, error } = baseOptions.diagnostic.prepareDiagnosticFor('loadDataPackage');
@@ -847,7 +851,7 @@ export function ddfCsvReader (logger?: any) {
847
851
  // skip parsing time/string concept types
848
852
  const concept: any = options.conceptsLookup.get(headerName) || {};
849
853
 
850
- return !includes([ 'time', 'string' ], concept.concept_type);
854
+ return !includes([ 'time', 'string', 'entity_domain', 'entity_set' ], concept.concept_type);
851
855
  },
852
856
  complete: result => {
853
857
  debug(`finish reading "${filePath}"`);
@@ -914,6 +918,7 @@ export function ddfCsvReader (logger?: any) {
914
918
  return {
915
919
  query,
916
920
  queryData,
917
- loadFile
921
+ loadFile,
922
+ getDatasetInfo
918
923
  };
919
924
  }
File without changes
@@ -31,8 +31,15 @@ export function prepareDDFCsvReaderObject (defaultResourceReader?: IResourceRead
31
31
  this.reader = ddfCsvReader(this.logger);
32
32
  },
33
33
 
34
- getDatasetInfo(): Object {
35
- return {name: this._basePath.slice(this._basePath.indexOf('ddf--'))};
34
+ async getDatasetInfo(): Promise<Object> {
35
+ const diagnostic = createDiagnosticManagerOn(myName, myVersion).forRequest('').withSeverityLevel(Level.OFF);
36
+ const baseOptions = Object.assign({}, this.readerOptions, { diagnostic });
37
+ return this.reader.getDatasetInfo(baseOptions).then(dataPackage => {
38
+ const datasetInfo = Object.assign({}, dataPackage);
39
+ delete datasetInfo.ddfSchema;
40
+ delete datasetInfo.resources;
41
+ return datasetInfo;
42
+ });
36
43
  },
37
44
 
38
45
  async checkFile(path: string): Promise<any> {
File without changes
File without changes
File without changes
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/common.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
package/test/main.spec.ts CHANGED
File without changes
package/test/mocha.opts CHANGED
File without changes
File without changes
File without changes
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