@@ -174,7 +174,7 @@ CLASS /apmg/cl_pacote IMPLEMENTATION.
174
174
175
175
METHOD /apmg/if_pacote ~get_version .
176
176
177
- result = pacote-packument-versions[ key = version ].
177
+ result = pacote-packument-versions[ key = version ]-manifest .
178
178
179
179
ENDMETHOD .
180
180
@@ -330,25 +330,18 @@ CLASS /apmg/cl_pacote IMPLEMENTATION.
330
330
TYPES :
331
331
" Copy of schema but without object attributes (which need to be converted to tables)
332
332
BEGIN OF ty_packument_partial,
333
- name TYPE string ,
333
+ name TYPE /apmg/if_types=>ty_name ,
334
334
description TYPE string ,
335
335
readme TYPE string ,
336
336
homepage TYPE string ,
337
337
icon TYPE string ,
338
- BEGIN OF bugs,
339
- url TYPE /apmg/if_types=>ty_uri,
340
- email TYPE /apmg/if_types=>ty_email,
341
- END OF bugs,
338
+ bugs TYPE /apmg/if_types=>ty_bugs,
342
339
license TYPE string ,
343
340
keywords TYPE string_table,
344
341
main TYPE string ,
345
342
man TYPE string_table,
346
343
author TYPE /apmg/if_types=>ty_person,
347
- BEGIN OF repository,
348
- type TYPE string ,
349
- url TYPE /apmg/if_types=>ty_uri,
350
- directory TYPE string ,
351
- END OF repository,
344
+ repository TYPE /apmg/if_types=>ty_repository,
352
345
_id TYPE string ,
353
346
_rev TYPE string ,
354
347
access TYPE string ,
@@ -360,7 +353,7 @@ CLASS /apmg/cl_pacote IMPLEMENTATION.
360
353
time TYPE /apmg/if_types=>ty_time,
361
354
person TYPE /apmg/if_types=>ty_person,
362
355
user TYPE /apmg/if_types=>ty_user,
363
- version TYPE /apmg/if_types=>ty_version ,
356
+ version TYPE /apmg/if_types=>ty_version_manifest ,
364
357
attachment TYPE /apmg/if_types=>ty_attachment,
365
358
packument TYPE /apmg/if_types=>ty_packument.
366
359
@@ -380,7 +373,7 @@ CLASS /apmg/cl_pacote IMPLEMENTATION.
380
373
ENDLOOP .
381
374
382
375
LOOP AT ajson->members( '/time' ) INTO time-key.
383
- time-timestamp = ajson->get_timestamp ( '/time/' && time-key ).
376
+ time-timestamp = ajson->get_timestampl ( '/time/' && time-key ).
384
377
INSERT time INTO TABLE packument-time.
385
378
ENDLOOP .
386
379
@@ -407,7 +400,7 @@ CLASS /apmg/cl_pacote IMPLEMENTATION.
407
400
LOOP AT ajson->members( '/versions' ) INTO version-key.
408
401
DATA (ajson_version ) = ajson->slice( '/versions/' && version-key ).
409
402
" this also validates the version manifest
410
- version-version = /apmg/cl_package_json=>convert_json_to_manifest( ajson_version->stringify( ) ).
403
+ version-manifest = /apmg/cl_package_json=>convert_json_to_manifest( ajson_version->stringify( ) ).
411
404
INSERT version INTO TABLE packument-versions.
412
405
ENDLOOP .
413
406
@@ -445,10 +438,9 @@ CLASS /apmg/cl_pacote IMPLEMENTATION.
445
438
446
439
ajson->setx( '/time:{ }' ).
447
440
LOOP AT packument-time INTO DATA (time ).
448
- " TODO: Replace with long timestamp
449
- ajson->set_timestamp(
441
+ ajson->set_timestampl(
450
442
iv_path = 'time/' && time-key
451
- iv_val = cl_abap_tstmp=>move_to_short( time-timestamp ) ).
443
+ iv_val = time-timestamp ).
452
444
ENDLOOP .
453
445
454
446
ajson->setx( '/users:{ }' ).
@@ -474,7 +466,7 @@ CLASS /apmg/cl_pacote IMPLEMENTATION.
474
466
ajson->setx( '/versions:{ }' ).
475
467
LOOP AT packument-versions ASSIGNING FIELD-SYMBOL (<version> ).
476
468
DATA (version_json ) = /apmg/cl_package_json=>convert_manifest_to_json(
477
- manifest = <version> -version
469
+ manifest = <version> -manifest
478
470
is_complete = is_complete ).
479
471
480
472
DATA (ajson_version ) = zcl_ajson=>parse(
0 commit comments