Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bochilteam/scraper-bmkg

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bochilteam/scraper-bmkg - npm Package Compare versions

Comparing version 1.0.2 to 5.0.0

20

lib/@types/types/index.d.ts

@@ -24,6 +24,5 @@ import { z } from 'zod';

}>;
export declare const GempaSchema: z.ZodObject<z.extendShape<{
export declare const GempaSchema: z.ZodObject<{
location: z.ZodString;
warning: z.ZodArray<z.ZodString, "many">;
}, {
date: z.ZodString;

@@ -35,3 +34,3 @@ time: z.ZodString;

depth: z.ZodString;
}>, "strip", z.ZodTypeAny, {
}, "strip", z.ZodTypeAny, {
date: string;

@@ -55,5 +54,4 @@ time: string;

}>;
export declare const GempaNowSchema: z.ZodObject<z.extendShape<{
export declare const GempaNowSchema: z.ZodObject<{
location: z.ZodString;
}, {
date: z.ZodString;

@@ -65,3 +63,3 @@ time: z.ZodString;

depth: z.ZodString;
}>, "strip", z.ZodTypeAny, {
}, "strip", z.ZodTypeAny, {
date: string;

@@ -83,6 +81,5 @@ time: string;

}>;
export declare const GempaRealtimeSchema: z.ZodObject<z.extendShape<{
export declare const GempaRealtimeSchema: z.ZodObject<{
location: z.ZodArray<z.ZodString, "many">;
isConfirmed: z.ZodBoolean;
}, {
date: z.ZodString;

@@ -94,3 +91,3 @@ time: z.ZodString;

depth: z.ZodString;
}>, "strip", z.ZodTypeAny, {
}, "strip", z.ZodTypeAny, {
date: string;

@@ -117,6 +114,5 @@ time: string;

export type GempaRealtime = z.infer<typeof GempaRealtimeSchema>;
export declare const TsunamiSchema: z.ZodObject<z.extendShape<{
export declare const TsunamiSchema: z.ZodObject<{
location: z.ZodString;
info: z.ZodString;
}, {
date: z.ZodString;

@@ -128,3 +124,3 @@ time: z.ZodString;

depth: z.ZodString;
}>, "strip", z.ZodTypeAny, {
}, "strip", z.ZodTypeAny, {
date: string;

@@ -131,0 +127,0 @@ time: string;

43

lib/cjs/test/index.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const mocha_1 = require("mocha");
const chai_1 = require("chai");
const node_test_1 = require("node:test");
const node_assert_1 = __importDefault(require("node:assert"));
const index_js_1 = require("../index.js");
(0, mocha_1.describe)('BMKG', () => {
(0, mocha_1.describe)('Gempabumi', () => {
(0, mocha_1.it)('Gempa dirasakan', (done) => {
(0, index_js_1.gempa)().then((res) => {
(0, chai_1.expect)(res).to.have.length.at.least(1);
return done();
}).catch(done);
(0, node_test_1.describe)('BMKG', () => {
(0, node_test_1.describe)('Gempabumi', () => {
(0, node_test_1.it)('Gempa dirasakan', async () => {
const data = await (0, index_js_1.gempa)();
node_assert_1.default.ok(data.length > 1);
});
(0, mocha_1.it)('Gempabumi Terkini (M ≥ 5.0)', (done) => {
(0, index_js_1.gempaNow)().then((res) => {
(0, chai_1.expect)(res).to.have.length.at.least(1);
return done();
}).catch(done);
(0, node_test_1.it)('Gempabumi Terkini (M ≥ 5.0)', async () => {
const data = await (0, index_js_1.gempaNow)();
node_assert_1.default.ok(data.length > 1);
});
(0, mocha_1.it)('Gempabumi realtime', (done) => {
(0, index_js_1.gempaRealtime)().then((res) => {
(0, chai_1.expect)(res).to.have.length.at.least(1);
return done();
}).catch(done);
(0, node_test_1.it)('Gempabumi realtime', async () => {
const data = await (0, index_js_1.gempaRealtime)();
node_assert_1.default.ok(data.length > 1);
});
});
(0, mocha_1.it)('Tsunami', (done) => {
(0, index_js_1.tsunami)().then((res) => {
(0, chai_1.expect)(res).to.have.length.at.least(1);
return done();
}).catch(done);
(0, node_test_1.it)('Tsunami', async () => {
const data = await (0, index_js_1.tsunami)();
node_assert_1.default.ok(data.length > 1);
});
});

@@ -1,31 +0,23 @@

import { describe, it } from 'mocha';
import { expect } from 'chai';
import { describe, it } from 'node:test';
import assert from 'node:assert';
import { gempa, gempaNow, gempaRealtime, tsunami } from '../index.js';
describe('BMKG', () => {
describe('Gempabumi', () => {
it('Gempa dirasakan', (done) => {
gempa().then((res) => {
expect(res).to.have.length.at.least(1);
return done();
}).catch(done);
it('Gempa dirasakan', async () => {
const data = await gempa();
assert.ok(data.length > 1);
});
it('Gempabumi Terkini (M ≥ 5.0)', (done) => {
gempaNow().then((res) => {
expect(res).to.have.length.at.least(1);
return done();
}).catch(done);
it('Gempabumi Terkini (M ≥ 5.0)', async () => {
const data = await gempaNow();
assert.ok(data.length > 1);
});
it('Gempabumi realtime', (done) => {
gempaRealtime().then((res) => {
expect(res).to.have.length.at.least(1);
return done();
}).catch(done);
it('Gempabumi realtime', async () => {
const data = await gempaRealtime();
assert.ok(data.length > 1);
});
});
it('Tsunami', (done) => {
tsunami().then((res) => {
expect(res).to.have.length.at.least(1);
return done();
}).catch(done);
it('Tsunami', async () => {
const data = await tsunami();
assert.ok(data.length > 1);
});
});
{
"name": "@bochilteam/scraper-bmkg",
"version": "1.0.2",
"version": "5.0.0",
"description": "BMKG scraper module",

@@ -17,4 +17,4 @@ "main": "lib/cjs/index.js",

"test": "npm run test:cjs & npm run test:esm",
"test:cjs": "mocha ./lib/cjs/test/*.js",
"test:esm": "mocha ./lib/esm/test/*.js",
"test:cjs": "node --test ./lib/cjs/test/",
"test:esm": "node --test ./lib/esm/test/",
"build": "npm run build:cjs && npm run build:esm && npm run build:types",

@@ -48,8 +48,4 @@ "build:cjs": "tsc -p tsconfig.cjs.json",

"devDependencies": {
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.17",
"chai": "^4.3.7",
"mocha": "^10.2.0"
"@types/node": "^20.14.9"
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc